Hi, is there a way in which I could open a VdxPage which on opening executes a script and sets variables. I have been testing this on DataMiner (10.2.7.0-11922) and I can seemingly only have one or the other. Removing the Execute option enables the page to be opened correctly but the script obviously no longer exists, inversely, when removing the SetVar and leaving the Execute the script runs and the page is blank - this also occurs when both Execute and SetVar properties are added to the shape (Seemingly the Execute takes precedence and the SetVar is no longer actioned.).
I have attempted to utilise a variable as a trigger which is updated when the page is opened, this however doesn't appear to work. I can see that the variable is being initialised and set correctly but unfortunately the trigger does not seem to be executed on ValueChanged.
Here is the Execute script structure I am using.
Script:Playout_AcknowledgePenaltyBoxAlarmCloud||ServiceName=[this service];ParameterDescription=[param:*,2502,[tableindex]];Bus=[var:PenaltyBoxBus];User=[thisusername]|Options:NoConfirmation|SetTrigger=ValueChanged
As mentioned above, PenaltyBoxBus is being changed, I can see this through a label I have placed for testing this change. It however does not execute the script as I would expect it to.
Any help would be greatly appreciated.
Variable initializations from InitVar are executed before the listener is set up for the ValueChanged. This means the variable will already be filled in and thus a change will never trigger.
Using the "ExecuteSetsOnInit" keyword in the page's Options shape data should do the trick for you.
If I’m understanding correctly you’re trying to execute a script with the execute shape data and within that same click open a vdxpage that then has another execute on the page? Any reason you can’t put all of the script executes on the page you’re opening?
In any case I think it’s best to modify the question a bit to better reflect the exact use case. That way I can set it up over here as well and see what’s going wrong.
Yes, I am trying to execute an automation script and open a vdxpage on clicking the same shape. As opposed to having to click two shapes to fulfil this purpose. Is this possible at all?
It should be yes. This is also why I think I will need some more info. Of course there are some things you can try yourself to narrow down the issue. For instance executing an as simple as possible script and linking to a page that only contains a visual. That way we can determine if this issue occurs for every shape with that combination of shape data or just for the one in your use case.
Apologies, this didn’t work. When I click a button on the visio to then execute a script and also display a vdxpage (with ExecuteSetsOnInit within it’s page options) it still only appears to complete one of the two requirements. In this case it is executing the script and not displaying the vdxpage.