Dynamic Select_one

363
4
04-22-2019 05:02 AM
ReneAubut
Occasional Contributor

Is it possible to have a Select_one receiving its choice list name from a previous question. At the start of my survey, am asking to select the type of campaign among a choice list of 2 items. Depending on the selected campaign type, i want to have the Select_one look for one of two choice list of boreholes 

Thanks

0 Kudos
4 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Rene,

It sounds like you would want to set up the second select one question with a cascading select - see Cascading and external selects—Survey123 for ArcGIS | ArcGIS 

0 Kudos
ReneAubut
Occasional Contributor

Thanks James, in fact I have some 300 monitoring wells (MW). All 300 participate in the water level campaign and a limited number participate in the water sampling campaign. So I wish to have all 300 show up in the MWid drop down list when doing the water level campaign and a limited list when doing the sampling campaign. In the example provided with Cascading, a city can only belong to one state. In my case, a MW can belong to both campaigns

0 Kudos
DougBrowning
MVP Esteemed Contributor

You could have it in your list twice.

So choices or external_choices is

list            name               type

WellList    Well1               WL

WellList    Well2               SC

WellList    Well1               SC

WellList    Well3               WL

Then your WL (Water level) select_one choice_filter could use type="WL"  (note I have trouble getting strings to work here so I make a field with a value of "WL" then do type=${field}).   In your case it may even be a radio button of which type and then limit the list.  Or maybe the user picks the well then you tell them the type to do.

SC (sample campaign) is the same except type="SC"

Then as you see above Well 1 will be in both lists.

I have also done ones where I have something like

list            name               WL   SC

WellList    Well1               Y      Y

WellList    Well2               Y

WellList    Well3                        Y

Then the choicefilter is WL='Y' and SC='Y'

Better yet I would do a Collector map that has all your wells on it.  Crew can use that to find it!  Then launch 123 sending the Well id over.  Here you could also send a field, or two, that tell the form the type (so send the SC and WL over).  Then it is dynamic right from a central spot.  I do this a lot to make my forms adaptive across states.  So for example one state does 25 cm sampling and others do 50. So in my Collector map I set the correct 25 or 50 - shoot this over to 123 and my form automatically adjusts.

The issue we have with just listing the well ids in the choices list is you have to republish the form every time it changes.  With Collector integration totally seamless.  Plus the huge benefit of helping people actually find the well, which so many workflows ignore.

For me l then create a Relationship class from the Wells to the sampling forms.  Now I can see all the forms that have ever been filled out right in Collector or AGOL seamlessly the second they are submitted.  I then have Arcade expressions that do some QA and warn in red in the Popup something is wrong.

Just an idea.

0 Kudos
ReneAubut
Occasional Contributor

Thanks Doug! your first idea worked fine and simplest for me

0 Kudos