Output based on comparsion of embedded data values | XM Community
Solved

Output based on comparsion of embedded data values

  • 11 June 2021
  • 4 replies
  • 226 views

Dear community members, I would like to ask you for advice regarding the possibility of comparing embedded data values.
I have several numeric embedded variables (e.g. NT1, NT2, NT3, NT4). For future use, I need to compare the value of these variables respectively used following logic in the "branch element" or/and in "the display logic". The logic I need to use is "Display question"/"then branch if" the embedded data NT1 > NT2 AND > NT3 AND > NT4. I'm right that the conventional way of writing an operator into branch element or display logic expects the numeric value after "is greater than"? So, the picture below is probably nonsense? Consequently, my question is: Is there any way to put the order I mentioned to branch element/display logic?
obrazek.png
I'm also thinking about evading this problem, and this is my second question. Is there any possibility of creating an embedded variable with a specific value as a result of comparing the source embedded variable's values? For example, (new embedded variable) NTT with value 1 if the embedded variable NT1 > the embedded variable NT2 AND > the embedded variable NT3 AND > the embedded variable NT4.
Thank you a lot for your answers.

icon

Best answer by ahmedA 11 June 2021, 20:04

View original

4 replies

Userlevel 5
Badge +11

From what I understood you're asking if the logic shown in the pic can be put into the display logic/branch logic such that the next question should be shown only if  NT1 > NT2 AND > NT3 AND > NT4 is true? Cause what you've written in the branch logic is correct but if you'd have to put that into the display logic of the question you want to display OR
You could do the following
First, create the embedded variables and assign them their values (NT1,2,3,4) and place them at the top of the survey flow.

  1. Write the branch you want

  2. then assign the value to the ntt as one inside the branch

  3. Place the block of question you wanted to display based on the branch inside the branch.

Userlevel 5
Badge +11

Screenshot (8)_LI.jpgThis might help

Userlevel 7
Badge +21

https://www.qualtrics.com/community/discussion/16614/output-based-on-comparsion-of-embedded-data-valuesThe text in the field after greater than or any other condition is interpreted literally. So you'll need to use the format for piped text like {e://Field/NT2} etc. otherwise your values will be compared to NT2 and since this will throw an error nothing will happen.

Eumetis ahmedA Thank you very much for your advice, it helped me a lot.

Leave a Reply