I have a string of 6 Near Me widgets that search different distances and run when a user selects a parcel. I would like to provide a summary of the features and the counts that are selected, for example:
Wetlands (1)
Waterbody (2)
Species at Risk (1)
The Near Me widgets analyze around 20 layers total. I do not want the layer name to show in my summary if no features were picked up - i.e. I don't want it to say Railway (0), I just want Railway to not show at all.
I know I can use dynamic text and put a space/empty character in the Expression name but that is still going to appear in my summary, and just make the spacing all weird.
Does anyone know if there is a way to accomplish this?
Thanks!
Hi @JBH, could you please share a screenshot of the expression you are using in the configuration and how it looks at the runtime?
Hi Aziza,
My text would look like this:
"Waterbody ("+COUNT({OBJECTID})+")" with just a space in the Expression name:
The output looks like this:
I thought I had gotten it to show up as just a space if nothing was within the proximity search but I guess I didn't, or I can't remember how I did...
But basically the output that I am looking for is the above except for where it says Species at Risk (0), I would like it to say nothing at all, because nothing was found. The list would instead look like:
Waterbody (1)
Aggregate Sand & Gravel (2)
@JBH ,
I have another question, are you showing the summary in Near Me widget? Near Me should not show the layer if there is no intersecting features. For example in this app, I have summary configured in Near Me widget for Wilderness layer, when it intersects with the layer, it shows the summary (Screenshot 1), if the search area does not intersect, the layer name does not show up (Screenshot 2)
If you are using Text widget to show your summary you can use arcade expression as Ke suggested, Arcade support will be available in Text widget later tonight after ArcGIS Online June update.
I am, yes. The problem is that we are migrating from another solution and our user's are used to having a more condensed summary. Because I am stringing together a few Near Me widgets and the output is larger (with the rectangles around the layer name, etc.), the users are having to scroll and take multiple screenshots, which they don't like.
Super excited for Arcade!! Thanks for your help!
Woohoo can't wait! Thanks Ke!
Is there a way to write the expression to display a certain message if no values appear in the field being referenced by dynamic text?
Yes, you can do that using arcade expression as well