I need to show/hide shapes based on a variable, if it's 1 then I need the some shapes to show and some shapes to hide, if it's 2 then I need the ones that were hidden with 1 to show, and the ones showing to hide.
I can't understand why this isn't working as I expect. I'm using both 'Hide' and 'Show' shape data fields to force the show and to force the hide (I have also tried just using hide, but I don't know if I should expect the shape to show again if the logic for hide evaluates to 0).
In the 'Hide' shape field I've got: [var:activeInput];=2
There is a static '1' in it's text field, there is no other shape data defined, are other data fields required?
P.S.
I've started with just using a simple variable at a session global level, but I need to use a page variable with '[ParentTableIndex]' in it's name for the real use case, will nesting that placeholder become a problem?
Thanks, James.
Hi James,
When using Show/Hide, you need to make use of the extended conditional shape manipulation actions.
In your example it will be something as following for the hide:
<A>-A|Value|[var:activeInput]|=2
Hi James, Is it possible that you are setting a card or page variable? In that case you need to replace ‘[var:’ with ‘[cardvar:’ or ‘[pagevar:’.
I have found that if I add the shape data ‘element’ with the value ‘*’ then the show/hide works as expected.
Is that expected behaviour? Does every shape need that data so that the functions work?
This is not expected and should not be required. Do you have this behavior when the ‘Hide’ condition is the only shape data for a specific shape? Can you try this on a standalone shape? What DataMiner version are you running currently?
Looks like we’re running 10.3.0.0-13297. I only had the show field defined on the shape. I have found that it works without the ‘Element’ field when at the top page level (not nested in a child group).
Thanks for your answer Jens, unfortunately that’s not working though; I have that in ‘Hide’ shape data field’s value and am setting that variable with two buttons for testing now and it’s not working.
I’ve got two icons one ending =1 and the other ending =1 on the end of the statement you posted, so when I set the variable to 1 or two, or of them to should be hidden at any time, and then show again when the variable changes to the other (that’s my expected outcome). But instead the icons show all the time, I’ve even for a text box outputing the variable and can see that it is indeed 1 or 2 as I set it.
Could it be that maybe it’s being set as a string and the statement is setup for an integer?
The buttons have this in their shape data: SetVar – activeInput:1 (or 2)
The icons and the buttons have no other data set, this is a nested (child) group these all live in, with a further nested child group inside this group.