Select to view content in your preferred language

Survey123 Connect search() not populating on the web

278
5
Jump to solution
3 weeks ago
A_Stan
by Esri Contributor
Esri Contributor

Good afternoon all,

I wondered if anyone has come across this at all? I have a autocomplete search with the following syntax: 

autocomplete search(concat("newtable?url=https://services1.arcgis.com/iKsbBcqgXYnhKSqt/arcgis/rest/services/Test_Service/FeatureServer/0","&where=select_date NOT IN('",${date_calculation},"')OR select_date IS null AND Permanent='No'"))

It performs three queries in the where clause and returns a list. This list populates just fine on Survey123 Connect. However when I publish to the web I receive the error: Failed to load the choice list. Please contact the survey owner to fix it.

Interested to see if anyone has come across before?

Cheers!

0 Kudos
1 Solution

Accepted Solutions
Neal_t_k
Frequent Contributor

Try a '?' instead of an '&' after the FeatureServer/0  for some reason there is some different syntax for the web and not sure why...

Also you may want to pull your concat calculation into a helper field, sometimes the search doesn't like a calculation.

View solution in original post

5 Replies
Neal_t_k
Frequent Contributor

Try a '?' instead of an '&' after the FeatureServer/0  for some reason there is some different syntax for the web and not sure why...

Also you may want to pull your concat calculation into a helper field, sometimes the search doesn't like a calculation.

A_Stan
by Esri Contributor
Esri Contributor

Thanks for the suggestions @Neal_t_k! Unfortunately the ? makes the dropdown empty so have kept the &. Do you mind explaining how I would go about doing the calculation in a helper field. Would that refer to just keeping the concat part in another field and adding that in as a ${variable}?

Strangely I updated S123 and now the web edition no longer shows an error, it just has no dropdown list option.

Thanks again

0 Kudos
Neal_t_k
Frequent Contributor

@A_Stan 

This might help you.  It is a very similar issue to yours.  There are some working examples provided in there that might help.   I will say that these dynamic search queries can get quite trial and error intensive because of syntax.  The web is much more strict on syntax than Connect.

https://community.esri.com/t5/arcgis-survey123-questions/how-to-keep-dynamic-search-list-empty-until...

Edit: Also if the error message is gone that is a good thing. Now the syntax needs cleaning.

Edit 2:  the '?' won't work in Connect, only the web app. and the '&' won't work in the web app.  At least that is what I have found.

Neal_t_k
Frequent Contributor

@A_Stan Here is another relevant recent discussion where this came up.

https://community.esri.com/t5/arcgis-survey123-questions/issue-with-query-parameter-not-working-in-s...

I am having trouble getting the request parameters to work in the web app. You may need to reconfigure using without using request parameters?

https://community.esri.com/t5/arcgis-survey123-blog/dynamic-choice-lists-using-search-appearance/ba-...

0 Kudos
A_Stan
by Esri Contributor
Esri Contributor

@Neal_t_k you're a genius. Putting the concat in a helper field and referencing that in my search did the trick after I also encoded the white space and single commas. Thanks for your help on this - much appreciated!

0 Kudos