I'm trying to open an element on a new tab and execute a script at the same time.
I tried this by having following shape data on the button:
Element: elementname
Options: OpenInNewCard
SetVar: ChannelName:[property:Channel Name]
And following page data
Execute: Script:InteractiveService||Active Channel=[Var:ChannelName]||Activate Channel|NoConfirmation,CloseWhenFinished|Trigger=ValueChanged
InitVar: ChannelName:NotUsed
The idea is that when the variable changes (on button click), the script is executed with the correct Channel Name.
But when the page loads, the script is executed with value NotUsed.
The strange thing is that when opening the page it's not executing the script with Active Channel equal to NotUsed. It's using another name for executing the script
My question is twofold:
Is there a better way to reach the goal of executing a script and opening an element in a new page at the same time?
And if this would be the best way, why would it use a different value for ChannelName?
I would personally leave the initvar out and use the NewCardVariable option to achieve what you need. Don't forget to use the cardvar placeholder instead of the var placeholder though.
ah I thought that’s what you were doing. Is it an option to do it like this?
What we have is services for TV channels that have a button on them.
Clicking the button opens an element card with a multiviewer video thumbnail on the Visio.
The idea is that this then tunes to that channel.
Preferably we would like to open the card and at the same time execute a script or do parameter sets on that element.
That should still be doable I think by indeed moving the execute to the page you’re opening?
I upgraded the system to latest 10.4.0 CU to have this feature.
On the services I have a shape with following shape data
View => Playout Multiviewer
Options => OpenInNewCard|NewCardVariable|NoAlarmColorFill
SetVar => MatrixInput:[property:Router Input]
On the Playout Multiviewer view I have a visio with following page data
InitVar => MatrixInput:init
And a shape with
Variable => MatrixInput
What I see is that the value remains on ‘init’ and does not change to the value from the SetVar on the service.
What could be the issue?
Hi Toon, according to the documentation this will set a variable on the element card that will open.
Does this mean I’ll need to move the ‘execute’ to the Visio on the element card?