Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set variable on active selection

Hi all,

i need help with a script.

I have a List Box like this : A

                                       B

                                      

and a variable vshowChart.

So when i select for example value 'A' i need variable set to '1', when 'B' variable set to '0'

Can u help me pls?

Tyvm

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Add an action to the OnSelect field trigger of the field in your listbox (Look on the Triggers tab of the document properties window). Choose External and then Set Variable to get the right action. Set the variable name to vShowChart and use this expression: =if(MyField='A',1,0). Replace MyField with the name of the field of the listbox.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
tresesco
MVP
MVP

PFA, used field event trigger

Gysbert_Wassenaar

Add an action to the OnSelect field trigger of the field in your listbox (Look on the Triggers tab of the document properties window). Choose External and then Set Variable to get the right action. Set the variable name to vShowChart and use this expression: =if(MyField='A',1,0). Replace MyField with the name of the field of the listbox.


talk is cheap, supply exceeds demand
sushil353
Master II
Master II

lets say your listbox field name is F1

then use

=vVariable=if(getfieldselections(F1)='A',1,0)

HTH

Sushil