Unique values in a List widget

02-15-2023 06:06 AM
Labels (1)
Occasional Contributor III

Hi all,

New to Experience Builder, so apologies if this has already been answered, but haven't found it anywhere.

I have a feature layer that contains sampling results from various sites. Each site can have from one to several hundred records. I'd like to be able to create a List widget where the values are the unique site names, i.e. each site listed just once, not one for each record. When I try setting Site Name to Unique in the builder, I get an error message telling me the SQL is incomplete (Site Name | is | Unique). I'm looking for the equivalent to "SELECT DISTINCT([Site Name]) FROM Layer". I can do this in Dashboard with Arcade. Is it possible in Experience Builder? Thanks!

0 Kudos
5 Replies
New Contributor II

Good question and I am looking for a similar answer for either the List or Filter widgets that they could be pre-populated with a unique list of values from an attribute field (in desktop it would be as simple as 'select by attribute' and selecting from a list right?  And Dashboards also allow you to do this.  I'm also quite new to Experience Builder so may have missed a trick.  There is this post which might help on how to populate a list https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-unique-values-i... but it's rather a workaround through loading in a separate table which could be a maintenance headache.  In the Filter tool you can set up a clause set of unique values but you have to set them up individually and if your data changes with say a new site (or new bird species in my case) you have to remember to add in the new categories!

Esri Regular Contributor

In ExB SQL builder, try using the predefined unique feature:



Or you will need to check the "Ask for values" option, otherwise, the SQL is indeed empty:



Occasional Contributor III

Thanks @TonghuiMing. I can't find the SQL Expression Builder pictured though. Where is that located?

New Contributor II

Good idea, but no dice. This works well for the filter widget, but doesn't perform as expected for the list widget.


I'm in the same position as @GregKeith - trying to display values in a list widget from distinct features only. Short of writing a python script to automate this, I'm absolutely stumped.

Occasional Contributor III

I ended up having to create a separate feature layer of just the sites. Even if I got distinct values from the first layer, it didn't help. The distinct values weren't tied to a particular location, so couldn't do actions like zooming the map.