Select to view content in your preferred language

Arcade IsEmpty on empty array always returns False?

690
2
Jump to solution
07-28-2023 07:49 AM
Mark_Johnson
New Contributor III

I'm working on an Arcade labeling expression in Arc Pro 3.0. If I enter only the code below, everything is labeled "0, false". Since nothing's been added to the array, I'm expecting IsEmpty to return "true". Am I thinking about this wrong, or is it maybe a bug?

var u = [];
return Count(u) + ", " + IsEmpty(u);

 Obviously I can use Count to check the array contents instead, but I've used IsEmpty in so many other places I just expected it to apply to arrays also.

1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

That's actually spelled out in the documentation

Returns false for all other cases, including empty arrays and dictionaries.

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

That's actually spelled out in the documentation

Returns false for all other cases, including empty arrays and dictionaries.

Mark_Johnson
New Contributor III

Of course it was right there in front of my face and I still didn't see it 🙄 Thanks!

0 Kudos