Select to view content in your preferred language

Arcade Expression to dynamically symbolize based on the lowest value across all features

444
1
08-10-2022 03:00 PM
AustinCanty1
Regular Contributor

I have a point feature that has an integer field called 'Sequence'. I'd like dynamically symbolize the point so that it always highlights the lowest value in the sequence. 

I can do something like this within the popup, but featuresets are not available in symbology. Is there another way to accomplish this without using a featureset?

var fs = FeatureSetByName($map, "Next Hydrant"), Sequence;
return first(fs).Sequence

0 Kudos
1 Reply
JohannesLindner
MVP Frequent Contributor

You could use Graduated Colors, but that wouldn't be dynamic.

You could probably rig something up with a calculation attribute rule. Add an integer field. When you insert/delete a feature or when you update the Sequence field, get the minimum Sequence value of the featureset, then update the new field of all features to 0 or 1, depending on whether their Sequence is the lowest. Symbolize with Unique Values on the new field.

It might be easier to just add the layer to the map a second time and set its definition query:

Sequence IN (Select MIN(Sequence) AS SmallestSequence FROM DatabaseName.DataOwner.TableName)

 

This will only show the feature(s) with the smallest Sequence value. Then you can use that layer to highlight these features:

 

JohannesLindner_0-1660201211437.png

 


Have a great day!
Johannes
0 Kudos