I’m trying to figure out how to pass two variables in a expression field.
Example SetVolumeAndSpeak(vol,message)
Setvolumeandspeak({SelectedVolume}, {TextMessage})
Is what I want to pass but when I put it in the expression field like
SelectedVolume, TextMessage I get
In an expression box, standard text is usually inside quotes, and the variable names are outside the quotes, with no curly brackets. The quotes can be either single, or double quotes, but stay uniform.
Here is an example using your phrase: Setvolumeandspeak({SelectedVolume, TextMessage})
and as typed in the expression box: 'Setvolumeandspeak('SelectedVolume', 'TextMessage')'
which returns: Setvolumeandspeak(40, Text Message)
It helps when you see the translation of the code in real time (grey background) as you type, making it easy to correct any grammatical errors. Often you’ll have to populate the variables once though to see it properly.
Here’s the piston. WebCoRE added curly brackets, but they were not typed in the expression box.
Side note:
If your receiving device requires the curly brackets, use this expression instead: 'Setvolumeandspeak({'SelectedVolume'}, {'TextMessage'})'
which returns: Setvolumeandspeak({40}, {Text Message})
(notice that everything is inside quotes except for the variables in the expression box)