In a repeat section, remove already selected options from select one type.

138
3
Jump to solution
01-25-2021 09:29 AM
Andre_Oliveira
New Contributor III

Hi all, I've come once against to ask for your support.

Im working on a tricky survey that is structured like this:

 

Section 1: A select_one type of question (select street name);

Section 2-1: a begin repeat group;

                       Section 2-2: A select_one type of question that get the choices filtered based on the response given on Section 1 (select doors based on the selected street).

                       Section 2-3: Give a status report to the selected on previous question.

End repeat

 

My question is, can I remove the options available on section 2-2 based on previous selected of the same question, considering its a repeat type of group? That is, I want the field-workers to select one street, do all door numbers, but to have the already done numbers to disappear from the select options. 

I know this has been asked before (https://community.esri.com/t5/arcgis-survey123-questions/remove-an-entry-or-item-from-the-dropdown-l...) but there wasnt a solution at the time. Considering that that thread has 3 years, and with the introduction of java functions, I was hopeful there was now a solution. 

 

Another option was the moment I select one street, have a grid-like appear with all the available door numbers to that street on one column and give the status on the other column, but I have no idea if something like that is even possible.

 

Thanks, cheers.

Tags (3)
Reply
0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Frequent Contributor

Yea do not use this for long lists.  I have 5,000 and it grinds to a halt.  Only for small lists.

Here is the post on 2 ways to check for dups.  Javascript way does not work across orgs or with anonymous so I always use the old way I came up with.

See here 

https://community.esri.com/t5/arcgis-survey123-questions/how-to-not-use-a-list-item-more-than-once/t...

and

 https://community.esri.com/t5/arcgis-survey123-questions/can-i-prevent-a-value-from-being-submitted-...

Javascript way is here

https://community.esri.com/t5/arcgis-survey123-questions/counting-quot-unique-quot-selections-across...

 

Hope that helps

 

View solution in original post

3 Replies
DougBrowning
MVP Frequent Contributor

Short answer is no.  Instead a add constraint that will not let them pick it twice and that seems to work fine.

But there is a hack now that may work for you.  Check out this post  https://community.esri.com/t5/arcgis-survey123-questions/dynamic-choice-filter-created-from-repeat-s...

Hope that helps.

Andre_Oliveira
New Contributor III

Thank you Doug! 

Im not sure I understand how the hack works (but hey, if it works it works), but also, considering I have hundreds, even thousands options across nearly 20 surveys, that seems a huge workload to make it work.

 

I think your first suggestions would be the best route to take. How would I add a constraint in a repeat that doesnt let the user pick the same answer? Thank you, once again.

Reply
0 Kudos
DougBrowning
MVP Frequent Contributor

Yea do not use this for long lists.  I have 5,000 and it grinds to a halt.  Only for small lists.

Here is the post on 2 ways to check for dups.  Javascript way does not work across orgs or with anonymous so I always use the old way I came up with.

See here 

https://community.esri.com/t5/arcgis-survey123-questions/how-to-not-use-a-list-item-more-than-once/t...

and

 https://community.esri.com/t5/arcgis-survey123-questions/can-i-prevent-a-value-from-being-submitted-...

Javascript way is here

https://community.esri.com/t5/arcgis-survey123-questions/counting-quot-unique-quot-selections-across...

 

Hope that helps

 

View solution in original post