I have a server Visual Overview containing an overview of my different Linux and Microsoft servers. When the user clicks on a server, the visual of that element gets embedded.
Each element visual make use of card variable varSelectedDiskTrendParameterIndex which gets an value C: assigned for Microsoft servers and value *root.0 for Linux servers.
When I open the element visuals, everything works.
Microsoft Visual
Linux Visual
When I open my server Visual Overview, the Microsoft visual gets loaded as it should be.
But when I select my Linux server, the card variable doesn't contain the correct value. I guess that the value of my Microsoft element is still used.
Is there a way that this can work without making use of different card variable names in the different Visual Overviews?
You're probably using the InitVar functionality to set your variable? As the name suggests, the InitVar will initialize a session variable with a value. This means that no value will be set if the variable already has been initialized.
If you want to set a variable upon opening a page, you can use the following workaround which uses a page execute, see help. Configure the execute to assign the value to your session variable. Don't forget to add the ExecuteSetsOnInit to execute the set using the initial value.
Execute Set|Variable|MyVariable|*root.0|SetTrigger=ValueChanged
Options ExecuteSetsOnInit
I was indeed using InitVar. The proposed workaround worked. Thank you!