Questionnaire script | XM Community
Skip to main content
Solved

Questionnaire script


Forum|alt.badge.img+4

Hi, 

 

If I have a CSAT question and thereafter a question asking for reasons behind the option selection somewhat like below. 
Is that possible? I know I can include the answer from the previous question but can a statement be introduced based on answer in the question? I have highlighted the 2 words I need to include based on the response provided. So if they select 7-10 I want satisfied to appear but not the rest, and if they select 1-6 I want “not entirely satisfied” to appear. 

 

 

Thanks 

Best answer by mdaruka

 

@Chee Heng_SZ thank you for the detailed reply, but it still is not working. Have you tried in your setup? Also I have setup the questions  in different blocks. Do we need to create embedded data fields namely “satisfied” “not very satisfied” in the beginning of the survey flow also, before the introduction? 

 

 

 

 

View original

12 replies

Nanditha MM
Level 4 ●●●●
Forum|alt.badge.img+14
  • Level 4 ●●●●
  • 101 replies
  • April 29, 2024

 

Hi @mdaruka 

 

You can use "Display Logic" to conditionally show questions based on responses to previous questions along with that you can pass the static values as you highlighted. 

 

Thank you!


Forum|alt.badge.img+16

Hi @mdaruka ,

 

Perhaps you can consider creating branch in survey flow.

Branch 1, condition “7-10”, set an embedded data “status” to be satisfied.

Branch 2, condition “1-6”, set embedded data “status” to be not entirely satisfied.

Then, piped in the embedded data in your question.


Forum|alt.badge.img+4
  • Author
  • Level 3 ●●●
  • 26 replies
  • April 29, 2024

@Chee Heng_SZ Hi,

It does not seem to appear in the embedded data in the question.

 

 


Forum|alt.badge.img+16

Hi @mdaruka ,

 

  1. Split your question A2 and A3 in different blocks.
  2. The embedded data should be a variable name (For example, “Status1” or “Satisfaction Level”) that you will use for both branches. (My apologies, I should not use “status” in the previous example due to similar name with Qualtrics keywords.)
  3. Then, piped in that variable name (“Status1” or “Satisfaction Level”) into your A3 question.

 

A sample of what I suggested previously:

Survey Builder
Survey flow

 


Forum|alt.badge.img+4
  • Author
  • Level 3 ●●●
  • 26 replies
  • Answer
  • April 30, 2024

 

@Chee Heng_SZ thank you for the detailed reply, but it still is not working. Have you tried in your setup? Also I have setup the questions  in different blocks. Do we need to create embedded data fields namely “satisfied” “not very satisfied” in the beginning of the survey flow also, before the introduction? 

 

 

 

 


Forum|alt.badge.img+16

Hi @mdaruka ,

 

I did preview the set up. It is working as expected. Displaying “Not entirely satisfied” when 1 is selected and “Satisified” when 7 is selected.

 

The placement of embedded data depends on how you want it to function. For this case, it should be directly after the branch.

 

Can you show your A3 to see if there is any issue with piped text?

Note: Piped text may not appear when there is different font size/family/color, causing issues.


Forum|alt.badge.img+4
  • Author
  • Level 3 ●●●
  • 26 replies
  • April 30, 2024

@Chee Heng_SZ  the 3 screenshot is my question and I have circled the piped text “Satisfaction level”. Oh I have changed the font from Qualtrics default to Arial will that be an issue>?


Forum|alt.badge.img+4
  • Author
  • Level 3 ●●●
  • 26 replies
  • April 30, 2024

below is my survey flow - @Chee Heng_SZ 

 

 


Forum|alt.badge.img+16

Hi @mdaruka ,

 

If the whole piped text “${e://Field/Satisfaction%20level}” is of the same font size/family/color, it shouldn’t be an issue.

As an example,

 

To test if it is a piped text formatting issue,

create another question, only piped in that embedded data and preview the survey.

or

remove all the formatting by clicking the “Tx” icon in the rich text editor and preview the survey.

 

Once confirmed that it is a formatting issue, slowly edit back the format that you wanted originally without affecting the piped text.


Forum|alt.badge.img+4
  • Author
  • Level 3 ●●●
  • 26 replies
  • April 30, 2024

yes it is a formatting issue. i will need to recreate the survey. Thank you @Chee Heng_SZ  for all your time and help! 


Forum|alt.badge.img+16

Hi @mdaruka ,

You don’t have to recreate the survey. 

Just make sure that when you edit the formatting in a question, be careful of the text that you selected when working with piped text.

If you don’t wish to edit the piped text format, make sure none of the pipe text including the $ and {} are selected.


Varun Raj Akula
QPN Level 3 ●●●
Forum|alt.badge.img+8
  • QPN Level 3 ●●●
  • 62 replies
  • December 9, 2024

You can utilize the survey flow for this purpose. Apply branch logic and set the relevant question choice logic, naming the embedded variable with a specific value. Repeat this process for the remaining options, ensuring that you use the same embedded field name for both.

Next, use this variable name as piping text in the question text where you want it to be displayed.


Leave a Reply