1

I've created a label dictionary to shorten a status type label from displaying "Access" to "A" or "No Access" to "N". This works perfectly in ArcGIS Pro, but reverts to "Access" in the Online environment. Here it is in ArcGIS Pro.

enter image description here

Here's what happens in ArcGIS Online.

enter image description here

I've been trying all kinds of combinations of expressions to produce the effect with Arcade, and I'm not getting it correct. This is the starting point in the editor.

enter image description here

I've tried var, iif, when, and being I'm still learning syntax I'm not getting anywhere.

1
  • Please always include Arcade expressions as formatted text rather than pictures.
    – PolyGeo
    Apr 28, 2023 at 18:59

1 Answer 1

1

Here's the answer in the shortest possible way I could discern.

var accessStatus = $feature["Access_Status"]
When(accessStatus == 'Access', "A",
     accessStatus == 'No Access', "N",
     accessStatus == 'Do NOT use this gate', "X",
     null)

Resource that got me over the edge is here. “ArcGIS Online: Enrich Your Maps with Arcade” https://youtu.be/Dmv_meDq07M

This got the job done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.