Select to view content in your preferred language

Arcade Expression Bool Error

126
2
Jump to solution
a month ago
PMaddocks
New Contributor

Hey everyone,

I am new to using Arcade. I'm getting a Bool error, not sure why. Any help or suggestions appreciated. Thank you

var a = $feature.WSE2yrEx;
var b = $feature.WSE2yrAlt;
var x = When(a = b, 'grey', a = null, 'green', b = null, 'green', a - b > 0.5, 'orange', 'red');
return x;

PMaddocks_0-1719333466787.png

 

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

In your "When" function, the conditions need to use "==" to compare values. A single "=" is for assigning values to variables.

- Josh Carlson
Kendall County GIS

View solution in original post

2 Replies
jcarlson
MVP Esteemed Contributor

In your "When" function, the conditions need to use "==" to compare values. A single "=" is for assigning values to variables.

- Josh Carlson
Kendall County GIS
jcarlson
MVP Esteemed Contributor

Oh and a won't be equal to null. You'll have to use IsEmpty(a) instead a = null, etc.

- Josh Carlson
Kendall County GIS