Select to view content in your preferred language

Group By in Data Expressions?

987
2
Jump to solution
07-20-2023 12:48 PM
GregKeith
Occasional Contributor III

I have a List widget that lists n number of sites from a Survey123 feature layer. Each site has multiple records associated with it. I'd hoped to use DISTINCT or something similar to get all the unique names, but couldn't figure out a way to do that. Instead, made a new layer with just the sites to populate the lists. Klunky, but works as long as I remember to add a new feature whenever a new site is added.

I'd like to add a text box to each list item showing the total number of records for each site. This would have to come from the original S123 layer, not the klunky one. In SQL or Arcade this can be done with 'GROUP BY site', but I can't figure out how to do this in Experience Builder. Is it possible, and if so, how? I found this thread, but when I try that - COUNT({site}) - I get an invalid expression error. Thanks!

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Not in Experience Builder, sadly. If your popup or feature label used Arcade, Experience Builder can see that, but it can't evaluate anything itself.

- Josh Carlson
Kendall County GIS

View solution in original post

2 Replies
jcarlson
MVP Esteemed Contributor

Not in Experience Builder, sadly. If your popup or feature label used Arcade, Experience Builder can see that, but it can't evaluate anything itself.

- Josh Carlson
Kendall County GIS
GregKeith
Occasional Contributor III

😢

Thanks Josh.

0 Kudos