Select to view content in your preferred language

Arcade script from Pro doesn't work in AGOL

333
2
06-20-2024 08:47 AM
JamesBurton1
Frequent Contributor

I've got this arcade script I use in ArcGIS Pro to symbolize my layer based on whether or not it has a value in the specified field. It doesn't work when I try to put this into a web map. What do I need to change so I can use this for AGOl symbology? I'm trying to avoid adding a field just for symbolization. 

var x = $feature.PLAT_NUM;
IIF(IsEmpty(x), "Pending","Active");

 

0 Kudos
2 Replies
DavidSolari
Frequent Contributor

Odd, this expression works in the Map Viewer for Enterprise 11.1 just fine. Does adding an explicit "return" keyword at the start of line 2 fix things?

0 Kudos
KenBuja
MVP Esteemed Contributor

That expression will work properly. Make sure that there is no expression or field in the "Choose attributes" section before saving your expression. Otherwise you'll get the "There was an error" message

Snag_192fd48.png

0 Kudos