I'm using the search widget to search a hosted feature layer present in the map. I don't get suggestions / partial matches if the widget is configured to search a field that has a list (domain/drop-down list). I've tested with a couple of different layers and fields and this seems to be consistent behaviour - if there is a list present on the field suggestions/partials don't work, switching to search on a different field without a list and they work again. Generally speaking, as the most useful field for us to search on is also the one we'll need to constrain to a list of set values, this is a little frustrating. Does anyone know of a workaround? Unless anyone has already done so already, I'll also raise this as an idea.
Thanks.
Hi Andy,
I gave this a quick test on my end and observed the same behavior. After some more digging I found that we do have the behavior logged as a bug internally - BUG-000095810: The Search widget returns a "no results found" message when searching for a field value that has coded value domains, and the coded value domain is not completely spelt out.
This is currently marked as a known limitation - however with the new ArcGIS Experience Builder | Build, Deploy, and Manage GIS Web Apps in Beta right now I am interested if it has been addressed. I am headed out a day early for the holiday now but will give this a test once I return.
Here is the link to Experience Builder if you want to test your workflow here as well: ArcGIS Experience Builder Beta.
Hope that helps,
-Peter
Thanks for the response Peter - I had a quick go on the Experience Builder (looks interesting), but I couldn't actually find a search widget in there at the moment. Might have missed it, I'd be interested to hear if you have any luck.
Thanks,
Andy.
Hi Andy,
I experimented with Experience Builder Beta and want to pass on what I found:
The Search widget is available once a Map widget is added. The Search widget is not configurable in the same way as the Web AppBuilder widget, and instead looks at the settings configured on the Web Map layer search. Fields with domains are not available to configure in Web Map search, either (known limitation).
I ultimately got this working in Experience Builder and the Web AppBuilder Search widget by calculating a new field in the Web Map from the field with domains to a field that does not have domains ($feature.DomainField in Arcade). This way the values are still constrained by the domain but auto-suggest functions as expected in search.
Hope that helps,
-Peter
Thanks for that Peter. Somehow I'd either forgotten or had managed to miss the fact that you can configure search in Web Maps. I've always just done this in apps. So this has already been very useful and will give me some more options to have a play around with. In my very quick test in web app builder it seemed that the search widget doesn't see calculated fields, so my less than ideal work around was to just duplicate my layer with non-editable version, just to use for searching. But if the map search can be configured to work with calculated fields then that sounds like a much better option.
Thanks,
Andy.
Hi Andy,
Thanks for the response on this, I'm glad Web Map search has opened up some options. I just tested calculating a field once more and was able to configure the field in Web Map search and with the search widget. A couple more things I noticed during this test: I would make sure to calculate the field in the Web Map so that the app looking at the map picks up the schema change. I also noticed that calculating a field with domains pulls the code rather than the label - so this workaround may only work for string domains.
Thanks,
-Peter