Select to view content in your preferred language

Arcade Filter a featureSet

177
4
Jump to solution
2 weeks ago
JessicaHendricks444
Emerging Contributor

We are working to visualize datasets for a Dashboard using a complex Arcade expression. However, we are stuck on the first Filter function of a featureSet. Can anyone offer suggestions??????

var quadTable = FeatureSetByPortalItem(portalUrl, itemId, 29, ["QuadInsp_GUID","FaunaPresent_MarshQuad"]); 
var quadOysters = Filter(quadTable, "FaunaPresent_MarshQuad IN ('1')");
 
The "FaunaPresent_MarshQuad" field can have text values of "1", "1, 2", "1, 2, 3", etc. We want to find those records that have a "1" somewhere present in that field.
 
Many thanks!
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

You can have multiple LIKES, but you have to use "OR" not "||"

FaunaPResent_MarshQuad LIKE '%1%' OR FaunaPresent_MarshQuad LIKE '%2%'

 

View solution in original post

0 Kudos
4 Replies
MobiusSnake
MVP Regular Contributor

Assuming you only have single-digit numbers, I think this would work:

FaunaPresent_MarshQuad LIKE '%1%'

If you have two-digit values it's going to be trickier.

0 Kudos
JessicaHendricks444
Emerging Contributor

Ooh that does work. Is there a way to select multiple values in that statement? I.e., if we want all records with a "1" or a "2" in them? 

 

Something like

FaunaPResent_MarshQuad LIKE '%1%' || FaunaPresent_MarshQuad LIKE '%2%'

Thanks so much!

0 Kudos
KenBuja
MVP Esteemed Contributor

You can have multiple LIKES, but you have to use "OR" not "||"

FaunaPResent_MarshQuad LIKE '%1%' OR FaunaPresent_MarshQuad LIKE '%2%'

 

0 Kudos
JessicaHendricks444
Emerging Contributor

Thank you both so much!!

0 Kudos