Select to view content in your preferred language

Simple Arcade Correction

89
1
Jump to solution
Wednesday
Labels (3)
FlightDeck
Regular Contributor

Hey all,

I have what should be a simple Arcade Expression but I cannot get the middle statement to work. 

var Building = $feature.Count;;

When(
    Building <= 0, + 0,
    Building < 1000, + "<1K", 
    Building >= 1000, + round(Building/1000, 0) + "K",
   
"")

 

The first statement returns zeros as expected when expected, the third statement returns values rounded to the nearest thousand and adds the K as expected but the middle statement will only return null values rather than <1K as I would like it to do. Probably something simple I am overlooking, but I have not yet been able to spot my mistake. Any help is appreciated. 

0 Kudos
1 Solution

Accepted Solutions
BrendanNewell
Esri Contributor

@FlightDeck  can we remove the "+" after the first comma so it looks like the following

var Building = $feature.Count;;

When(
    Building <= 0,  0,
    Building < 1000,  "<1K", 
    Building >= 1000,  round(Building/1000, 0) + "K",
   
"")

 

🙂

View solution in original post

1 Reply
BrendanNewell
Esri Contributor

@FlightDeck  can we remove the "+" after the first comma so it looks like the following

var Building = $feature.Count;;

When(
    Building <= 0,  0,
    Building < 1000,  "<1K", 
    Building >= 1000,  round(Building/1000, 0) + "K",
   
"")

 

🙂