I am looking for a solution that replicates the 'LIKE' function in SQL statements.
for example
IIF($feature.name LIKE 'target text', "", $feature.name)
if the target text is found in the feature attribute then it returns nothing, if it's not present then it returns the value found.
I am trying to avoid the multiple uses of IIF and WHEN statements with a simple LIKE... is this functionality possible yet in arcade?
Solved! Go to Solution.
Have you tried using the Find function: Text Functions | ArcGIS for Developers?
// IIF($feature.name LIKE 'target text', "", $feature.name)
IIF(Find('target text', $feature.name) > -1, "", $feature.name)
Have you tried using the Find function: Text Functions | ArcGIS for Developers?
// IIF($feature.name LIKE 'target text', "", $feature.name)
IIF(Find('target text', $feature.name) > -1, "", $feature.name)
What is the equivalent to Haystack LIKE 'b%'?
Find('b',Haystack) will succeed on "ab","abc","ba" and "b" whereas LIKE 'b%' is only true for "ba" and "b".
I've realised, Find('b',Haystack) == 0 will match Haystack LIKE 'b%'.
This took me a hot minute to get my head around it, but YES! This is a great solution until they get LIKE into arcade. Worked like a charm! (see what I did there??)