Survey123 - Is it possible to auto populate a 'select_one' type based on two previous questions that are 'select_one' types as well?
For example - I have two "yes or no" select_one questions (fields: NEED_IND and DELETE_CORNER.) If the answer to both of those questions is 'No', then I would like to auto populate the subsequent select_one (field: TYPE_CD) question with the value 'Not Needed.' Is this possible?
Please see attached. Thank you!
-Casey
Casey,
This is possible, but you will have to use a pulldata() request that concatenates your answers from question 1 and 2. Then you will need to think ahead for all of the possible answers within your .csv that contains the concatenated answers to the questions.
Let's say that you have the following possible answers "Yes" and "No" to two questions that you have available within your survey. You also want question 3 to be populated from the answers of questions 1 and 2.
All the possible answer combinations for Question 1 and Question 2 are as follows -
Yes, No
Yes, Yes
No, No
No, Yes
So, within your csv file you have the answers for Question 3 that are triggered by the concatenated answers; I would add in an underscore, that will then be used to populate the answer to Questions 3.
Yes_No = Indicator needed, but no corner
Yes_Yes = We need both
No_No = Not needed
No_Yes = No indicator, but a corner would be nice.
The pulldata() function would look something like this and keep in mind you will need to substitute in the names of the fields. This would need to be placed within the calculation field for Question 3.
pulldata('IndicatorCornerAnswers','Question3Answers','Question1and2Answers',(concat(${Question1},'_',${Question2}))).
Table might look something like this
Question3Answers | Question1and2Answers |
Indicator needed, but no corner | Yes_No |
We need both | Yes_Yes |
Not needed | No_No |
No indicator, but a corner would be nice. | No_Yes |
I would give this a read and then develop this within the Survey123 Connect application and then post to your server/service.
Good Luck,
Mike