Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm wondering how I can place multiple text values within a variable and, if a selected dimension value matches one of the values in the variable, activate a button.
The variable contains comma separated values and I'm trying to say that when a selected value in a dimension = a value in the variable, show 1, 0.
Something like this:
if(match(Getfieldselections(Dimension),Variable),1,0)
My variable is set like this in the script:
Set Variable = 'Text1','Text2','Text3';
Any suggestions?
Or this if the button should be hidden when not selection in Dimension is made
Max(Aggr(If(SubStringCount(Variable, Dimension) >= 1, 1, 0), Dimension)) and GetSelectedCount(Dimension) > 0
Try this:
Max(Aggr(If(SubStringCount(Variable, Dimension) >= 1, 1, 0), Dimension))
Sample attached
Or this if the button should be hidden when not selection in Dimension is made
Max(Aggr(If(SubStringCount(Variable, Dimension) >= 1, 1, 0), Dimension)) and GetSelectedCount(Dimension) > 0
Sunny, why we need Max(Aggr()) cant we just use
like in layout conditional
= vVar = If(SubStringCount(Variable, Dimension) >= 1, 1, 0) ??
If this need to work only based on a single selection, then without Max and Aggr() will work... but in case we need this to work based on multiple selection, then without Max and Aggr() it will not work....
Ah, Got it. Thanks for that.
Thank you both for the responses! I only needed it to be based on a single selection and it's working without the max and aggr.
David, by mistake you have made my response as correct. I did not give that solution, i got that from Sunny. I have just asked that question to him.
No harm, Even though you use them, it still works...So, i feel i should not be credited for this as i just copied from his expr.