I have a simple sql expression used to filter on a layer in ArcGIS Pro
Field1 = 'Open' AND Field2 = 'LP' AND Field3 IN (10, 11, 12, 13, 14)
I would like to convert it to an Arcade Expression for use in a Velocity filter. Below is what I have come up with so far but it is returning some syntax errors.
$feature.Field1 = 'Open' && $feature.Field2 = 'LP' && $feature.Field3 IN (10, 11, 12, 13, 14)
Does anyone have suggestions how to convert the sql query to a arcade expression?
Thanks
Solved! Go to Solution.
The Arcade expression below might work. I think you'll need double equal signs. And the syntax for "IN" is a little different in Arcade. https://developers.arcgis.com/arcade/function-reference/array_functions/#includes
$feature.Field1 == 'Open' && $feature.Field2 == 'LP' && Includes([10, 11, 12, 13, 14], $feature.Field3)
The Arcade expression below might work. I think you'll need double equal signs. And the syntax for "IN" is a little different in Arcade. https://developers.arcgis.com/arcade/function-reference/array_functions/#includes
$feature.Field1 == 'Open' && $feature.Field2 == 'LP' && Includes([10, 11, 12, 13, 14], $feature.Field3)
The Arcade Expression you provided works perfectly. Thanks for taking time to solve my problem.