Branching logic to compare embedded data variables is failing | XM Community
Skip to main content
Solved

Branching logic to compare embedded data variables is failing

  • January 25, 2021
  • 5 replies
  • 582 views

w.patrick.gale
Level 3 ●●●
Forum|alt.badge.img+13

I have a branch in my survey flow that checks the values of a NextRead and QNextRead embedded data variable. For testing purposes I simply set the branch logic to 'If NextRead is equal to 1 And QNextRead is equal to 1' then execute the stuff in the branch. I should note at this point that the NextRead value is coming from Contact embedded data and QNextRead originates from the querystring. When NextRead and QNextRead values are equal to 1 then this branch executes (below is a screenshot of the branch logic)
image.png
However if I add an additional condition that compares the two ED variables, then the branch is false (does not execute). If both of the first two conditions are true, then why isn't the third?
image.png

Best answer by LaurenK

Hi w.patrick.gale! I connected with our Support team on this one, as it definitely seemed a bit tricky. They let me know that you will need to use Piped Text in the third line of the branch (in the second screenshot) to make this work. "QNextRead is Equal to NextRead," is comparing the value of the QNextRead Embedded Data element (which is equal to 1) to the string "NextRead" instead of the value of the Embedded Data element called "NextRead." Instead of "NextRead" in the third line it should be the Piped Text "${e://Field/NextRead}." Here is a screenshot of what that would look like.

5 replies

pogi
Level 2 ●●
Forum|alt.badge.img+14
  • Level 2 ●●
  • January 26, 2021

It might be iterating as a number to text or text to number.
You can define embedded data in the survey flow panel.
Also, check both by piping them into a text question then preview the survey to see if you are getting what you are expecting for the values.


LaurenK
Former XM Community Team Member
Forum|alt.badge.img+13
  • Former XM Community Team Member
  • Answer
  • February 5, 2021

Hi w.patrick.gale! I connected with our Support team on this one, as it definitely seemed a bit tricky. They let me know that you will need to use Piped Text in the third line of the branch (in the second screenshot) to make this work. "QNextRead is Equal to NextRead," is comparing the value of the QNextRead Embedded Data element (which is equal to 1) to the string "NextRead" instead of the value of the Embedded Data element called "NextRead." Instead of "NextRead" in the third line it should be the Piped Text "${e://Field/NextRead}." Here is a screenshot of what that would look like.


w.patrick.gale
Level 3 ●●●
Forum|alt.badge.img+13
  • Author
  • Level 3 ●●●
  • February 8, 2021

Thank you @LaurenK. It would be helpful if the support documentation would specify if a field will parse a plain variable name (in the case of the 'left' field for this condition) or when piped text is expected (in the case of the 'right' field for this condition). It is especially difficult to test this within the survey flow if it isn't clear to users what the fields will or will not parse.


LaurenK
Former XM Community Team Member
Forum|alt.badge.img+13
  • Former XM Community Team Member
  • February 8, 2021

https://www.qualtrics.com/community/discussion/comment/34292#Comment_34292I'll go ahead and forward this feedback to our technical writers! In the future, feel free to submit comments like these via the Feedback tab found on the left side of the Support site, as that will go directly to the team. Thanks!


Forum|alt.badge.img+1
  • July 12, 2022

LaurenK Seems like this is still not added in the documentation. I was trying to figure out the solution from few days and now able to found a solution after seeing one small suggestion provided in the image.