Working on an experience builder that allows the user to filter locations by a set category. There is also a service field that I would like users to filter by. This service field is comma delimited and I am curious on what are the best ways to filter comma delimited items. I have a filter widget that filters the services field by using "contains" and then using the "Predefined multiple values". This works but since the predefined list cannot dynamically change when other filters are activated, I want to find a better way. I also tried using the search widget with the search field being the services field. This works OK but I am curious if there is another way that might be more user friendly.
If you are using Contains in a comma separated list, are you doing full matches or partials? I'd be concerned about whether it found matches with or without the comma.
if I was writing code for this I'd probably take the list as a string (cause that's what it is), split it into an array and then convert it to a dictionary or key value pair structure... but that's only if it was complete entry matches, partials would likely require more work I think.
The problem is I don't think EXBnatively suipports dynamic filtering on delimited values in this way.
One way might be to use a custom view with an SQL Expression widget.
@JeffreyThompson2 has a possible example of this over here:
https://community.esri.com/t5/arcgis-experience-builder-questions/re-filter-widget-how-to-handle-mul...
I think his example requires knowing in advance all the possible values that field may happen (i'm not sure that will always be possible)
Exb invariably works off the raw string values, and it doesn't to my knowledge treat a delimited string as actually a list or array by design. Because of this predefined lists don't update when other filters reduce the result set.
Contains will return false positives so like filtering for "X" returns "X", "XY", "Y,X"...
you would then have partial pattern matching within the string and not true filtering I think.
But if you know the list potential values you can use ask for values and set it up that way I think.
but I don't think that works with delimited fields as well.
Usually when I see delimited data that's a sign of an embedded table being needed to create a relationship between 1 to many data. (comma separated/delimited text is a flattened string representation but using it means you lose some possibilities)