Attribute Expressions in Popups Using Arcade - Wildcard?

2170
2
Jump to solution
08-11-2017 09:47 AM
by Anonymous User
Not applicable

Is it possible to use wildcards in Arcade?

I am creating an attribute expressions where i have an IIF statement.

IIF(Field1="Landowner" || Field1=" Landowner 1+ pref"), "True", "False")

Would it be possible to wildcard landowner so it picked up everything with Landowner as the value instead of creating a bunch of OR statements?

0 Kudos
1 Solution

Accepted Solutions
MatthewLofgren
Occasional Contributor

This doesn't answer your question about wildcards, but for this example you could do

IIF(Find("Landowner", Field1) >= 0), "True", "False")

which will search Field1 for the word "Landowner" and return it's position. If the position returned is >=0, Field1 contains the word "Landowner".

View solution in original post

2 Replies
MatthewLofgren
Occasional Contributor

This doesn't answer your question about wildcards, but for this example you could do

IIF(Find("Landowner", Field1) >= 0), "True", "False")

which will search Field1 for the word "Landowner" and return it's position. If the position returned is >=0, Field1 contains the word "Landowner".

KenBuja
MVP Esteemed Contributor

You can use the Find expression to look for that term.

IIF(Find("Landowner", $feature.Field1) > -1, "True", "False");‍

Edit...

matt2222‌ beat me to the answer