Hello,
I need some help building the following pseudo code expression for unique value symbology, expressed in Arcade:
Pseudo Code:
list1 = ['a', 'b',...]
list2 = [ 'w', 'x',...]
if field1_val in list1 AND field2_val in list2:
return 1
else:
return 'other'
Much appreciated.
Tyler
Solved! Go to Solution.
We can use Includes to check whether the values are present, than Iif to evaluate the two together:
var list_a = ['a', 'b', ...]
var list_b = ['w', 'x', ...]
var a = $feature['attribute_a']
var b = $feature['attribute_b']
var in_a = Includes(list_a, a)
var in_b = Includes(list_b, b)
return Iif(in_a && in_b, 1, 'other')
We can use Includes to check whether the values are present, than Iif to evaluate the two together:
var list_a = ['a', 'b', ...]
var list_b = ['w', 'x', ...]
var a = $feature['attribute_a']
var b = $feature['attribute_b']
var in_a = Includes(list_a, a)
var in_b = Includes(list_b, b)
return Iif(in_a && in_b, 1, 'other')
@jcarlson; What took you so long? 9 minutes? 😉... I'll give that a whirl. Much appreciated! Tyler