Q_PopulateResponse text entry box in multiple choice question | XM Community
Skip to main content
Solved

Q_PopulateResponse text entry box in multiple choice question

  • November 22, 2023
  • 10 replies
  • 206 views

Forum|alt.badge.img+2

Hello, 

I am trying to test my survey by populating age to be equal to “35”. This would populate a text entry box of a multiple choice question

I’ve tried various ways: 

Q_PopulateResponse={"QID1":"{"Value":"35"}"}

&Q_PopulateResponse={"QID1":"1"{"Value":"35"}}

&Q_PopulateResponse={"QID1_3_TEXT":{"Value":"1","Text":"35"}}

&Q_PopulateResponse = {"QID1":[{"Value":"1","Text":"35"}]}

&Q_PopulateResponse={”QID1”:”1”,"QID1_3_TEXT":"35”}

&Q_PopulateResponse={"QID1":{"1":"35"}}

&Q_PopulateResponse={"QID1":{"1":{"1": "35"}}}

&Q_PopulateResponse={"QID1":{"1":{"1_TEXT": "35"}}}

Best answer by TomG

@Rhaven Nelson,

Use this:

{"QID1":[{"Value":"1","Text":"35"}]}

Where the question id is QID1, the choice id is 1, and the text box value is 35.

10 replies

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • 1555 replies
  • November 22, 2023

@Rhaven Nelson 

You can directly include that value in default choice of that question if you want to test it.

Hope it helps!


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 14 replies
  • November 22, 2023

Thank you, however, I need to mass produce test responses. so there are 4 questions at the beginning of my survey that I’d like to populate and test with different answers. 

 

I did try to first include that value as a default choice and then generate test responses with the other 3 simple multiple choice questions, however, it seems that default choice does carry over to ‘generate test responses”

 


Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • 1555 replies
  • November 22, 2023

@Rhaven Nelson 

You can create an embedded data pipe that in place of value/default value and change value in that embedded data it will pick up the value dynamically when you change it.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 14 replies
  • November 22, 2023

Thank you! However, sadly,  this did not work for me either

 

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • Answer
  • November 22, 2023

@Rhaven Nelson,

Use this:

{"QID1":[{"Value":"1","Text":"35"}]}

Where the question id is QID1, the choice id is 1, and the text box value is 35.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 14 replies
  • November 22, 2023

This finally worked thank you so much!  One thing I did wrong was use the recode value.  Is there an easy way to find the choice ID without clearing records survey-wide? 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • November 22, 2023

This finally worked thank you so much!  One thing I did wrong was use the recode value.  Is there an easy way to find the choice ID without clearing records survey-wide? 

Preview the question then use the inspect feature of your browser to look at the input element. It will have a choiceid attribute.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 14 replies
  • November 22, 2023

Wonderful, thank you!!


Forum|alt.badge.img
  • 1 reply
  • April 16, 2025

@Rhaven Nelson,

Use this:

{"QID1":[{"Value":"1","Text":"35"}]}

Where the question id is QID1, the choice id is 1, and the text box value is 35.

How can I use this to check other boxes in the multi-select list in addition to the last option, which is a text box?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • April 18, 2025

@Rhaven Nelson,

Use this:

{"QID1":[{"Value":"1","Text":"35"}]}

Where the question id is QID1, the choice id is 1, and the text box value is 35.

How can I use this to check other boxes in the multi-select list in addition to the last option, which is a text box?

You can separate the choices with commas. For example:

{"QID1":[{"Value":"1","Text":"35"},{"Value":"2"}]}