Hi all,
Some advice is required on how to scope a session variable properly. I'm observing that my session variable is being scoped per Dataminer Cube session when the desired outcome is to scope it per Visio file.
At the page level, I'm using:
InitVar ---> ElementName:Element_A
I have several Visio files that does the same thing:
e.g.:
Visio file A
InitVar ---> ElementName:Element_A
Visio file B
InitVar ---> ElementName:Element_B
Visio file C
InitVar ---> ElementName:Element_C
However, the end result is that I see the following when I load Visio file A first:
Visio file A
ElementName:Element_A
Visio file B
ElementName:Element_A
Visio file C
ElementName:Element_A
Hi Bing,
Session variables can have one of the following scopes:
- Current DataMiner Cube session (default scope)
- Current DataMiner Cube card
- Current Visio page
- Current workspace
To change the scope, an additional shape data field of type Options must be added to the shape.
More info can be found here:
Hi Ive, what was confusing to me was how to scope InitVar. Does scoping not apply for InitVar?
It does, but in that case you need to place the Options shape data on the page. It might be that your variable gets initialized in all 4 scopes at once though, but that should not be a problem for your use case as you can still update and use the var within a specific scope.
Hi Toon, the problem is that I'm using the same variable name across multiple visuals (multiple services) and need the variable to be only set at the page (at the very most card) level.
I stumbled upon this post which answered my question: https://community.dataminer.services/question/visio-page-inititvar-behavior.
However, I'm open to hear any other ideas.