Select to view content in your preferred language

Survey123 Automation

2822
6
Jump to solution
01-25-2023 03:30 AM
MariusVerdes25
Emerging Contributor

Hello. I need to make an automation inside the Survey123 form that will autocomplete some of the answers based on the answer from a question. I'm not so advanced in working with Survey123 and I need some help to make this happen.

Attached you can find the xls form from the survey. 

What I am trying to achieve is: when I select "no" to question 7.1, the automation to select "no" to a couple more questions (1.1; 5.2; 6.4; 6.5.a; 6.5.b; 6.5.c; 6.5.d; 6.5.e; 6.5.f; 6.5.i; 7.16, 7.18). With the knowledge I have right now, I need to make a calculation for this.

Can someone please explain to me what exactly needs to be done to achieve this automation?

Thanks and regards.

 

 

 

Tags (1)
2 Solutions

Accepted Solutions
Richard_Purkis
Esri Contributor

Hi @MariusVerdes25 

If I understand your query correctly, you need to apply an IF statement in the calculation field to any respective question that follows 7.1.Use the following format: 

  • if(selected(${Q7_1},'no'),'no',0)

Hope this helps

View solution in original post

JenniferAcunto
Esri Regular Contributor

You need to match the capitalization of your no in the choice list, since the response would be 'No', your statement looking for 'no' would never evaluate to true. if(${Q7_1} = 'No', 'No', '')

- Jen

View solution in original post

Tags (1)
6 Replies
Richard_Purkis
Esri Contributor

Hi @MariusVerdes25 

If I understand your query correctly, you need to apply an IF statement in the calculation field to any respective question that follows 7.1.Use the following format: 

  • if(selected(${Q7_1},'no'),'no',0)

Hope this helps

MariusVerdes25
Emerging Contributor

Hi @Richard_Purkis,

Thank you for replying. I tried to use your suggested "if statement", but for some reason, I can't make it work.

To see if I understood correctly, after each question that I wanted to autocomplete with "no" based on the answer for question 7.1, I should insert the statement that you provided. 

Here it's a screenshot from my xls form.

Capture.JPG

Many thanks

0 Kudos
Richard_Purkis
Esri Contributor

Hi @MariusVerdes25 

I've been unable to use the xlsx you provided. I can't find the choices tab.

Instead I have attached an extremely simple example where the second question will populate the answer of 'no' because the first question had an answer of 'no'

Hope this helps

0 Kudos
MariusVerdes25
Emerging Contributor

Hello @Richard_Purkis,

I tried your suggestion in my survey and it did not work. Here is a copy of my xls form, but I removed the sensitive information. I hope this is useful and that you can help me 🙂 

Thanks.

0 Kudos
JenniferAcunto
Esri Regular Contributor

You need to match the capitalization of your no in the choice list, since the response would be 'No', your statement looking for 'no' would never evaluate to true. if(${Q7_1} = 'No', 'No', '')

- Jen
Tags (1)
MariusVerdes25
Emerging Contributor

Thank you @JenniferAcunto. It works perfectly now.

0 Kudos