Select to view content in your preferred language

Search() Appearance with search parameters not pulling data

768
2
02-01-2024 01:34 PM
KristinThorpe1
Regular Contributor

I have a form to gather information about new projects. I want to use a search() function to generate two dynamic dropdown lists with possible companies and contacts from an existing Client table. The Client table is published to ArcGIS Online and shared publicly.

Users will first select a Company from the drop down and the Contact drop down will filter based on the selected Company. Both of these selections appear to work properly in Survey123 Connect, but the Contact drop down does not populate with  values in the web app.

KristinThorpe1_0-1706822564590.png

I did get the Contact drop down to populate, but only when I defined a value as the search text and not with ${ExistingClients} like I need (attached).

UPDATE: The Contact drop down only works if I specify a search text without a spaces.

Ex: search(tableName, 'matches', 'Company', 'LIVIC') will work and populate with possible Contacts, but search(tableName, 'matches', 'Company', 'LIVIC Civil') or search(tableName, 'matches', 'Company', ${Company}) will not.

KristinThorpe1_1-1706823029264.png

I based the search() functions off a different form with the same parameters and workflow that does work in the web app, so I am not sure why this form is not working properly. The web app is behaving strangely and I'm not sure what else I can try to troubleshoot this issue. Any suggestions would be appreciated!

The form was created in and published from Survey123 Connect version 3.18.

0 Kudos
2 Replies
VHolubec
Esri Regular Contributor

Hello @KristinThorpe1,

I think the problem is that you use Company as a target filed, and you should get use the value of the NAME from the Choice Lists you are querying to.

Like it is in the sample Survey:

VHolubec_0-1713883009885.png

 

VHolubec_1-1713883021042.png

 

Hope it still helps.

 

Vladimir
0 Kudos
KristinThorpe1
Regular Contributor

Hi @VHolubec ! Thanks for the suggestion, but I believe I am already doing that (unless I misunderstood). According to the Survey123 Blog, the searchColumn should be the field name (Company) in my table with the names of the companies and the searchText is the text to search within that field (${ExistingClients}. The dynamic list is working properly in Survey123 Connect but not in the web app. As far as I know dynamic lists are supported in web surveys so I'm not sure where the breakdown is. Is there anything else I can try?

KristinThorpe1_0-1714073662932.png

 

0 Kudos