Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show condition with 2 variables

Hi everyone,

is it possible to set up the show conditional of a list box on 2 variables?

I want to set 2 variables with 2 different buttons and if there is the right combination the list box should appeare.

With just 1 variable it works easy, but how can I handle 2?

Thanks for helping

20 Replies
Anonymous
Not applicable
Author

like the attached example?

Not applicable
Author

Hi

I know my example here is using fields and not variables but there is no reason why it shouldn't work with multiples.

=sum( {<_Metric#={2}>} _Metric#) and sum({<_MetricPeriod#={101}>}_MetricPeriod#)

I am using the above in a conditional show and it works like a charm

Oli

Not applicable
Author

In this case, you have to use IF condition like If(vVariable1=0 and vVariable2=1,1,0). If you don't want to use IF condition, then set the variable vVariable1 to some other number other than 0 (zero) when the button is clicked. Then you can simply use vVariable1 and vVariable2


Regards,

KKR

Not applicable
Author

Hi thx for that example, the idea is quiet good.... but... now the two buttons are no longer independent... and where have u done the combination of the Var1 and Var2 to create VNew?!

Not applicable
Author

the problem is, I have to use vVariable1=0 ...if I change it, I have to change the whole structure of the document 😞

Anonymous
Not applicable
Author

under tab Settings/variable overview you can define variables

in the example you will find the 3 variables V1, V2 and VNew

can you post your requirments for the 2 Buttons and variable? when the listbox should exactly Show and

when not

be Aware that these defining a variable here will not preserve the value if you

reduce your app with and save it

better: place the variable Definition in script

Not applicable
Author

Then use If(vVariable1=0 and vVariable2=1,1,0)


Regards,

KKR

Not applicable
Author

2 independent buttons. Button1 set vVar1=0. Button2 set vVar2=1. List Box should appeare if there is the combination of vVar1=0 and vVar2=1 else nothing to see.

Anonymous
Not applicable
Author

like the attached app?

Not applicable
Author

Perfect, thank you so much