Hello,
I have been working on embedding a SRM timeline into a visio view and in doing so have been experimenting with the JSON ability to add filters and different sets of data.
for example, I have in the visio been setting SRMRESERVATIONS_YAxisResources:
{"Type":"custom","Name":"GROUP1","Background":"#ADC9CA","Height":"*","ItemHeight":"45","Filter":"(ReservationInstance.Properties.\"Booking Manager\"[String]=='Booking Manager') AND (ReservationInstance.Properties.ServiceName[String] contains 'GROUP1')"},{"Type":"custom","Name":"GROUP2","Background":"#ADC9CA","Height":"*","ItemHeight":"45","Filter":"(ReservationInstance.Properties.\"Booking Manager\"[String]=='Booking Manager') AND (ReservationInstance.Properties.ServiceName[String] contains 'GROUP2')"}
This works great and gives me the desired result, however it is not dynamic enough for us to use in multiple locations.
I was therefore hoping to create a script which can generate the different minified json strings that we need as above for different locations
the cardvariable SRMRESERVATIONS_YAxisResources is set as part of InitVar and also Execute on load so that the data is available for the timeline, however I have found that if I attempt to set a variable this way using a parameter form another element it does not work.
This may be expected behaviour but wanted to check if I am missing something obvious or if there is a better way of doing this for displaying the groups of data dynamically (or at least dynamically in the sense that they are using a parameter rather than being static in the visio - I know that it will not change until a card is reopened etc).
Many thanks
Oliver
Picking up on this piece of your question:
the cardvariable SRMRESERVATIONS_YAxisResources is set as part of InitVar and also Execute on load so that the data is available for the timeline, however I have found that if I attempt to set a variable this way using a parameter form another element it does not work.
In those situations it's best to use the Execute page data and trigger on a ValueChanged. For example, you could do a script execute when your param comes in or changes:
Script:ScriptName|Parameters:Parameter1=[param:1/1,1]|SetTrigger=ValueChanged
For more info, see Configuring a page to execute a script automatically | DataMiner Docs