Select to view content in your preferred language

Symbolising using Arcade for values not in the Feature Layer

137
3
Monday
Labels (2)
AndrewMurphy3
Occasional Contributor

Hi Community. I am trying to symbolise a layer using the following Arcade Expression:

 

var operationalStatus = $feature.OPERATIONALSTATUS;
var ownership = $feature.OWNERSHIP;
return When(
operationalStatus == "In Service", 1,
ownership == "PPP", 2,
operationalStatus == "OOS Abandoned", 3,
operationalStatus == "OOS Demolished", 4,
operationalStatus == "OOS Maintained", 5,
operationalStatus == "Planned", 6,
operationalStatus == "Disposed", 7,
999
);

I am symbolising on the number returned from this statement. Currently in my data I don't have and values for operationalStatus ==  "Planned" so the number 6 is absent from the returned symbology list, however I would like to assign a symbol for it as it may occur in my data in the future.

Without adding a dummy record that meets the criteria of operationalStatus == "Planned" to my data is there a way of being able to symbolise for all these values? This is just an example of a larger symbolising exercise I am undertaking across features so adding the records to the data isn't the feasible solution at this point.

0 Kudos
3 Replies
AndrewMurphy3
Occasional Contributor

Just to add, some of the symbols will require value across more than 3 attributes which is why Arcade is the preferred solution

0 Kudos
AlfredBaldenweck
MVP Frequent Contributor

Huh. My workaround I was going to suggest (green plus button) is not an option for arcade symbology, apparently. 

Submit an Idea for this and I'll upvote it. I may put in a support ticket, too.

Robert_LeClair
Esri Esteemed Contributor

Yes but.... Normally, In ArcGIS Pro > Symbology (Unique Values) you can manually add a class for a value that doesn’t currently occur in the data.

  1. Open the layer Symbology pane and set Primary symbology = Unique Values (with your Arcade expression in Field 1).
  2. On the Classes tab, click the Green Plus sign.
  3. Click the the Options dropdown, add new value.  And from here it throws an error - "requested operation could not be completed"...normally you'd go to Step 4 and be done...
  4. Click Add new value and type the value you want to symbolize (in your case, add the missing returned value, e.g. 6, and set the label to Planned).
  5. Assign the symbol you want for that class.

But here's what I learned...there's a BUG.  "BUG-000161636 : Add unlisted value options triggers an error message 'Requested operation could not be completed' while adding a new value, under the symbol class using custom arcade expression."

Not sure when it will be fixed as it's listed "under consideration."

0 Kudos