Select to view content in your preferred language

Filter when Field Contains the Text in Arcade

619
2
Jump to solution
09-09-2024 12:58 PM
Labels (1)
JustinH
Frequent Contributor

Hello- 

I am currently trying to filter a dataset by using an expression in Dashboards. The expression does more than just this filter so I cannot use the handy dandy filter tool within elements. 

What I want my expression to say is Filter(dataset, feature 'contains the text' "State"). 

It seems fairly simple but I am having a hard time figuring this out. I tried following some of the suggestions from jcarlson in this post: 

Solved: Arcade Expression for field "includes" a value - Esri Community

However, I am not really sure how to integrate this Split + Includes or the Find workflow into my filter function. 

Here is a more Specific Code: 

// Filter the FeatureSet for "State Trust" in the FUNDING_SOURCE field using Includes

var statelands = Filter(fs, Includes('FUNDING_SOURCE', 'State Trust'))

TIA! 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

You can use the "Like" operator in the sql statement

filter(fs, "FUNDING_SOURCE Like '%State%'")

 

View solution in original post

0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor

You can use the "Like" operator in the sql statement

filter(fs, "FUNDING_SOURCE Like '%State%'")

 

0 Kudos
JustinH
Frequent Contributor

YES! Thank you so much! 

0 Kudos