Select to view content in your preferred language

Arcade Symbology ignoring first condition

457
2
Jump to solution
02-20-2025 03:25 PM
AaronScott2
Emerging Contributor

I do not know much Arcade. I am trying to create a custom Arcade expression. It is rather simple, but Portal and Pro ignore the first condition. It does not like the two-part argument. The symbology style page only shows Yes and No. It does not show Edited.

when(
$feature.edited == "Y" && $feature.withinplot == "Y", "Edited",
$feature.withinplot == "Y", "Yes",
$feature.withinplot == "N", "No",
"N/A"
)

I tried using an IF statement. I can get it to validate, but it still does not like the two-part argument.

Any help is appreciated.

0 Kudos
1 Solution

Accepted Solutions
NicoleJohnson
Frequent Contributor

Edit: I just tried a similar thing with some Living Atlas data, and I think #3 might be the problem:

  1. If you make the conditions not overlap, does it work then (I don't think this should matter, as the documentation says When "Evaluates a series of conditional expressions until one evaluates to true")?
  2. Have you double-checked that the data does have the combination for "Edited"?
  3. Another thing to check is that "Edited" isn't somehow being grouped into the "Other" category (see if "Other" has a number next to it indicating how many features are in that category).

To get symbology from "Other" into a new group, check the box next to it and choose "move to group" or "new group":

NicoleJohnson_0-1740144723064.png

View solution in original post

2 Replies
NicoleJohnson
Frequent Contributor

Edit: I just tried a similar thing with some Living Atlas data, and I think #3 might be the problem:

  1. If you make the conditions not overlap, does it work then (I don't think this should matter, as the documentation says When "Evaluates a series of conditional expressions until one evaluates to true")?
  2. Have you double-checked that the data does have the combination for "Edited"?
  3. Another thing to check is that "Edited" isn't somehow being grouped into the "Other" category (see if "Other" has a number next to it indicating how many features are in that category).

To get symbology from "Other" into a new group, check the box next to it and choose "move to group" or "new group":

NicoleJohnson_0-1740144723064.png

AaronScott2
Emerging Contributor

Thank you for the reply. I see what you are saying about a when statement evaluating until it finds a True statement. I did not have any Edited = Y values in my data. I was planning for the future. I had to temporarily make the condition true for the symbology to show up. 

#3 in your answer was also helpful. When I did make the condition true, it was grouped into Other and had to move it out of the group.

On another note, I was over thinking my conditions. I did not need to qualify withinplot and Edited together. Qualifying Edited = Y was sufficient by itself.

0 Kudos