Solved
How to base an Email Trigger or Action on a calculation from responses in two different blocks...
... without losing Back button navigation within the survey?
I have a survey where I need to perform a math operation using the numeric values from questions in two different blocks, in order to determine whether or not to send an email alert. The result of the math operation determines whether or not the respondent meets a threshold, and if not, then the email alert (via an Email Trigger or an Action) is sent to a staff member upon submission of the survey.
I'm using Embedded Data in the Survey Flow and "setEmbeddedData" in Javascript to store the value of the operation. It works if the Embedded Data value is assigned in the middle of the survey, but the catch is that I can't put the Embedded Data element by the Blocks where the questions are located in the Survey Flow or at the end of the survey, because then I would lose the Back button at that point in the survey, and backward navigation is a requirement for this survey.
I've tried assigning the variable for the result of the operation in the Embedded Data at the very beginning of the Survey Flow, but it doesn't compute or get assigned when the operation occurs in later blocks.
Is there a creative workaround to this limitation or an obvious solution I'm missing? Thanks in advance for any insight or suggestions.
Best answer by Anonymous
> @MatthewM said:
> Thanks for your reply @Sashi. I guess I didn't state it specifically above, but yes, I've done that too. But as I understand it, when you set embedded data in Javscript you also have to have already created it in the Survey Flow too; I've read that the two have to go hand-in-hand. Or is it possible to set embedded data in Javascript without creating the variable name in an Embedded Data object the Survey Flow?
You are right, declare the embedded data at the very start of the survey flow
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
