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

SAP SAC - can't use objects from another page in script

0 Likes
2,405

Hello,

I need to apply filters and variables to a table that is on another Page, but SAC won't let me.

Why I can't reference to a table within a same story just on different page?

Is there any workaround?

Thank you,

Tomas.

error: "You can't use "table_2" since it is on a different page."

Accepted Solutions (0)

Answers (3)

Answers (3)

gthomson
Explorer
0 Likes

Hi there

 

Not sure if this is a good solution, it isn't exactly pretty...

For Filters I can't help much but for Variables you can work around it as follows:

On Page 1 (where your chart is not there) do the following steps:

1. Create a simple KPI tile with a single value from the same Query you want to change.

2. In the Chart properties (right panel) set the Data refresh of the new chart to "Always Pause"

3. In the Outline (left panel) disable mouse actions and make the chart invisible.

4. Define your variable using the hidden chart chtHIDDENCHART.getDataSource().setVariableValue("VARNAME", "VARVALUE");

5. This will update the Variables linked to the Query it is sharing so when you go the the page the Variables are set before the report runs.

 

Not sure if there is a better way to update Story Filters/Variable directly but this worked for me

sourabhpaul
Participant
0 Likes

Hi,

For this you have to use a global script and global parameters.

Regards,

Sourabh Paul

N1kh1l
Active Contributor
0 Likes

tomaskopas86

Try using Script variable and Script Objects ( functions ) in place of local variables.

Hope it helps !!

Nikhil

0 Likes

Hi Nikhil,

thank you very much, I have created a Script variable to set there the UI5 input list for the filter. Then I have created a new Function and it looked good with no errors. But then when I try to run that function from another Page where is the report for my query I am still getiing that error that the object is not on current Page, this is just insane, it is one story, SAC should be able to get data from one Page to another or vice versa.

It seems that for my purposes can be used a TAB STRIP where multiple queries might be present within 1 page in SAC and script can recognize all the needed objects.

Tomas.

tilted
Explorer
0 Likes
@N1kh1l Do you have an example how to solve that?