Matrix Table (Constant Sum) -- passing the 'Total' value from one Matrix Table question | XM Community
Question

Matrix Table (Constant Sum) -- passing the 'Total' value from one Matrix Table question

  • 26 June 2021
  • 1 reply
  • 180 views

Hi, I want to pass the 'Total' value from one Matrix Table (Constant Sum) question to another Matrix Table (Constant Sum) question's first column. So this is what I tried to do.

  1. In the Survey Flow after the 1st Matrix Table question, set a embedded data field with the value from the 'Total' box in the first row as shown below.

  2. QID1-Total = ${q://QID1/ChoiceGroup/QID1-1_Total} (Not sure if I have the correct syntax to capture the first row's Total field. I got the element id by doing Inspect on the page.)

  3. Then pipe that newly embedded data field in the 2nd Matrix Table question's first column's first text box by going to default choices and adding the field as shown below.

  4. ${e://Field/QID1-Total}

So I'm not sure if I'm setting the embedded data correctly in step 1. Please let me know how can I get that value from the Total in the first row and assign it to an embedded data field. Thank you,


1 reply

Userlevel 4
Badge +13

You can get the total's value by following code, please update value as required;
 jQuery('.QuestionBody').eq(1).find('tbody tr').find('input[type="text"]').val();

And then set the value to embedded data on page submit class.

Leave a Reply