Arcade needs a LIKE function

10-11-2021 10:29 AM
Status: Open
Occasional Contributor III

I've had several use cases while using a when() or iif() function in Arcade where it would have been really nice to have the ability to match text using LIKE in the same way that it's used in SQL. My most recent use case is that I have several point locations on a map with a field holding website URLs. My client wants all URLs with a specific domain name (let's say as an example) to have different text for the hyperlink than all of the other URLs. So, I'd want to write a statement like this:

when($feature.URL LIKE "", "Go to Esri sponsored site", "Vendor Website")

Any website that starts with would return the text "Go to Esri sponsored site" and all other sites would return Vendor Website. I can use that custom expression for the text:


And use the {URL} parameter for the actual link.


I think Find should suit this case. Let me know if it doesn't...


IIF(Find("", $feature.URL) > -1, "Go to Esri sponsored site", "Vendor Website")


Here's the documentation:



Oh nice! That worked like a charm. Thank you, Kristian!