setting variable value depending another variable

Discussion, questions and support.
Post Reply
miaousse
Posts: 2
Joined: Feb 12th, ’19, 10:32

Post by miaousse » Feb 12th, ’19, 12:09

Hello,
I would like to create a form where i select with a radio button a value. Is it possible to set the value of others variables based on the first choice?

Ie %INSERT_Choice% (radio type button: choice1 and choice2)

%INSERT_dependentChoice1% (dependentChoice1_1, dependentChoice1_2)
%INSERT_dependentChoice2% (dependentChoice2_1, dependentChoice2_2)
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Feb 12th, ’19, 14:18

One way is to use Conditional macro, like:

%SELECT__Choice%%IF_MyCondition%%SELECT_sel1%%ELSE%%SELECT_Sel2%

where the condition is
(SELECT__what="Choice1")

Use 'No Output' prefix "_" in front of a variable name (_Choice) to instruct FastKeys not to output the value.
miaousse
Posts: 2
Joined: Feb 12th, ’19, 10:32

Post by miaousse » Feb 13th, ’19, 08:48

Thank you for the answer.
I was not able to have the condition work the first time but i finally manage to get it.
Post Reply