Setting style based on Arcade expression in AGOL?

03-08-2022 07:50 AM
Occasional Contributor

I added the Microsoft Building Footprints - Features feature layer to my map in AGOL, which is a polygon feature layer.  I know I can add an Arcade expression to get the square footage of a feature via AreaGeodetic($feature,'squarefeet').  However, it seems that in AGOL Map Viewer, I cannot configure a style on such so I can color the polygons based on numeric classes/ranges of square footage.  Is this not possible?



0 Kudos
2 Replies
MVP Esteemed Contributor

It is technically possible, but the symbology profile executes per feature, and will probably not have enough information to determine the symbology range, etc:


You should look at the function Expects. This, however, will only work if the area is a field in the layer.

Speaking of where, where are you pulling these features from? I found a version of it on AGOL, and the Shape__Area field is an attribute available to symbolize on, so you don't even need Arcade for this.

- Josh Carlson
Kendall County GIS
0 Kudos
Occasional Contributor

Josh, shape_area does not reflect the area in sq ft.  It is why I have to leverage the Arcade expression.

Also, it is unclear how Expects() will work.  Can you please elaborate?

0 Kudos