Autofill a hidden question - Please can someone help! | XM Community
Skip to main content

Hello, If I have a multiple response checklist question such as

“Q1 What fruits do you eat?”

  • Apples
  • Bananas
  • Coconut
  • Dragonfruit

and a follow up question

“Q2 What fruit do you eat the most?” (same scale),

 

how can I get it so I can hide Q2 when Q1 has only one response, and autofill that response in my dataset based on their answer at Q1? 

Any javascript on Q2 won’t work because the question needs to show for the script to run? 

 

Please note I have very little knowledge of javascript.

If anyone can help me I would be so happy - I have tried AI assistance to no avail. I have found similar posts but nothing with my particular problem.

Hi @Stefan_LP you can add a display logic on Q2 saying ‘show only if Q1 selected count is greater than 1’. Rather than using javascript to auto-punch you can store that fruit in an branch logic, embedded data in the survey flow if the selected count is only 1 in Q1. 

 


But will Q2 have data in it for all respondents? Or will this just split the data, with some people answering Q2 and others in a new column in the dataset called “most_eaten_fruit” ? 


yes right the data will be split. 


Thanks, that’s not a solution for my particular problem but I appreciate your effort. I have posted about recoding instead - do you know if this is possible/how to do?

 

Hoe to recode - i.e. create a new variable from two or more existing variables | XM Community (qualtrics.com)


Hi @Stefan_LP ,

 

I believe it will be in another column.

There are a few methods to have the data in a column.

1) You can combine them by creating a combine field column through Coalesce using field editor.

2) You can add more branches in the survey flow with the condition to be equals to a choice with the same embedded data to be piped in from Q2’s selected choice.

For illustration only. 

 


I found the field editor before but it does not let me work with a multiple select checkbox question type.

 

As for number 2, this looks complicated, but I might try it when I am in a better headspace - have spent all day and failing all the time has taken a toll  - do not have it in me to try this step now.


The “2) You can add more branches in the survey flow with the condition to be equals to a choice with the same embedded data to be piped in from Q2’s selected choice.” worked for me

The variable was unable to be used in a qualtrics report, so had to recreate it via bucketing as a workaround.

 

Thanks so much! 


Leave a Reply