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!
Solved! Go to Solution.
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.
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.
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
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.
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.
@A_Stan Here is another relevant recent discussion where this came up.
I am having trouble getting the request parameters to work in the web app. You may need to reconfigure using without using request parameters?
@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!