Access entire choice list in note

841
2
Jump to solution
03-16-2021 07:25 AM
JohnHuillery1
Occasional Contributor

I'm attempting to create a note question type that displays all items from a choice list that have not been selected in a repeat.  I have no problem building a string containing all items that have been selected.  Is there a way to access either the entire list? I am open to writing it into a JS function if possible.

0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @JohnHuillery1

This can likely be accomplished using a JavaScript function. When you select a choice in a repeat and pass that question into your JavaScript function it will be in an array. What you can probably do is hard code an array of all your choice list values in your JS function and then compare the array of selected values to the full array and then return the values that do not have matches. 

Please see this link for a potential workflow that can help achieve this. 

Thank you,
Zach

View solution in original post

2 Replies
ZacharySutherby
Esri Regular Contributor

Hello @JohnHuillery1

This can likely be accomplished using a JavaScript function. When you select a choice in a repeat and pass that question into your JavaScript function it will be in an array. What you can probably do is hard code an array of all your choice list values in your JS function and then compare the array of selected values to the full array and then return the values that do not have matches. 

Please see this link for a potential workflow that can help achieve this. 

Thank you,
Zach
JohnHuillery1
Occasional Contributor

This is pretty much the approach I ended up going with. It works but it's not great for lists that change often.

0 Kudos