Embedded Data Equality & Logic | XM Community
Skip to main content

We are hosting a survey where we’d like to compare people’s birthdays reported to an age they reported on a different survey. We have the age calculated by DOB using Java script. Our issue is at the end of the survey, we are trying to set up embedded variables based on the equality between the ages, and it isn’t working. I have both “age” embedded data set to numbers, I’m trying to figure out if I typed this wrong? 

 

Because of this helpful thread is why we also have survey_age Is equal to ${e:// and so on

 

sometime date format may create this issue, use datediff function of javascript to compare both dates.


Did you tried setting up a flag using JS in a hidden question and then use that as a logic for the same?

Sometims JS works better than this comparision of embedded values!


Thank you all! We ended up using a different variable and avoided this all together, but it was very helpful!


Leave a Reply