Set variable with Javascript custom value sets the expression

I have a text field on one screen (MAIN) that should display basic configuration created in another screen (CONFIG).  To do this, I have an interaction on the Save button on CONFIG that should set a variable snt_config using the following expression:

({snt_freq} == '') ? '' : (({snt_occurrence} == NaN) ? 0 : {snt_occurrence})x {snt_freq}


Which should evaluate to something like "3x Daily".  I then have a callback to that interaction that sets the text property of the field in MAIN to the value of snt_config.


What actually happens is that the text field displays a form of the expression with the other variables evaluated, as in the screenshot below.



How do I do this?

1 comment

Please sign in to leave a comment.