cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAC script to obtain Story Folder

IGadhia
Explorer
0 Kudos
500

Hi experts, here is a technical goal. 

In the SAC optimised story I would like a text box to be made visible only when the stories save folder path meets a certain criteria. 

ie

If the current Story path contains "Pathx" then Text box = visible 

It is so that we can make a clear visible distinction when people open stories saved in the 'centrally approved' folder where stories are validated and those homebrew stories that are being run from users own folders. 

I have tried to look if there is some script where I can obtain the story path, but cant find it. 

 

Any ideas?

Thanks all

View Entire Topic
N1kh1l
Active Contributor
0 Kudos

@IGadhia 

not sure if there is an API to return you the folder path. But if the idea is to make sure if the user is opening the story from the approved folder and not their own saved copies, you could try the getInfo() of Application which return Application information and this will be different for one in approved folder and one in user folder.

https://help.sap.com/doc/1639cb9ccaa54b2592224df577abe822/release/en-US/index.html#Application_MgetI...

 

Nikhil

IGadhia
Explorer
0 Kudos
using Getinfo would mean that on each story I need to maintain a check to say if getinfo().ID does not equal the specific ID of the approved story. I woul dneed to maintain that in each dashboard. However, If I can check the older I can do it on a patternmatch that applies to all stories. I wonder if there is a script I can write that can go and lookup a value? I can do a lookup with getinfo().name to the sap model SAP__SAC_USAGE_FILES to get the folder. Or does the community have any other ideas?