web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Match Substring to ite...
Power Apps
Unanswered

Match Substring to items in a list

(0) ShareShare
ReportReport
Posted on by 30

How do I match substring to items in a list?

How do I do a Contains match on a list?

 

I have a microsoft form that auto populates an excel sheet. One question on the form is a multicheck box that allows users to select the various categories that their entry falls under. For each entry, these category tags are saved as a string separated by ";" in a single cell. The data is structured this way by microsoft default and adding a formula to edit this formatting is not supported for excel sheets connected to microsoft forms.

 

//tags are formatted as:

"Clothing;Banking;Food;"

 

 

In my app, I have a table with this data in a gallery and I have a combo box that lists all those categories. I want to be able to filter by categories selected in the combo box. This works right now for entries with a single "tag" but does not work for entries tagged with multiple categories. I am also filtering by many other things. Here's a snippet of what I am using now that does not meet all my needs:

 

//This is what I'm using right now that only works for entries with a single category tag
SortByColumns(
 Search(
 Filter(
 [@Table1],
 // checkbox filters
 If(
 fee_filter.Value,
 program_fee = "Yes",
 program_fee <> Blank()// fee
 ),
 // combobox filters
 If(
 IsBlank(servicecat_filter.Selected),// service category
 true,
 Service_category in servicecat_filter.SelectedItems
 )
 ),
 // making some fields searchable by text search
 TextSearchBox1.Text,
 "Organization_Name",
),
 "Organization_Name",
 If(
 SortDescending1,
 Descending,
 Ascending
 )
)

 

 

I'm not sure how to approach this problem. It seems that `Split` is very difficult for my use case as an entry can have any number of tags, and I'm not sure how to match a string/substring to a list as shown in the code snippet below that throws an error:

 

 

// Why doesn't this work? 
// combobox filters
 If(
 IsBlank(servicecat_filter.Selected),// service category
 true,
 IsMatch( Service_category, servicecat_filter.SelectedItems, Contains ), //<--CHANGED***
 )

 

 

Any ideas of how I should approach this problem?

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard