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

Embedded Data Equality & Logic

  • July 24, 2023
  • 3 replies
  • 63 views

Forum|alt.badge.img+2

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

 

3 replies

Forum|alt.badge.img+12
  • QPN Level 3 ●●●
  • 38 replies
  • July 25, 2023

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


rgupta15
Level 4 ●●●●
Forum|alt.badge.img+8
  • Level 4 ●●●●
  • 92 replies
  • July 25, 2023

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!


Forum|alt.badge.img+2
  • Author
  • Level 1 ●
  • 1 reply
  • August 28, 2023

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