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 / Filter by partial match
Power Apps
Unanswered

Filter by partial match

(0) ShareShare
ReportReport
Posted on by 175

Hi all,

 

Running into some trouble filtering a gallery. I have a reference variable that is populated by a different list and looks something like this:

 

QuestionA~AnswerA;QuestionA~AnswerB

Meanwhile, the gallery to be filtered will compare to that variable in one of it's columns that has values looking like:

 

QuestionE~AnswerD;QuestionB~AnswerC;QuestionA~AnswerA

 

In this example:

QuestionA~AnswerA;QuestionA~AnswerB

QuestionE~AnswerD;QuestionB~AnswerC;QuestionA~AnswerA

 

Since a portion of each string match, this row would pass the filter check. Any way to code this in PowerApps? These strings can also be turned into one-column tables using the semicolon as a delimiter, but I'm running into the same issues there.

 

Let me know if you have any ideas!

 

Thanks,

Farhan

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @farhandsome ,

    Do you want to filter items like this: "QuestionE~AnswerD;QuestionB~AnswerC;QuestionA~AnswerA" based on data like this: "QuestionA~AnswerA;QuestionA~AnswerB"?

    Since you need to split "QuestionA~AnswerA;QuestionA~AnswerB" based on ";" , so you need to filter twice.

    One for the first part "QuestionA~AnswerA", one for the second part "QuestionA~AnswerB".

    Try this formula:

     

    Filter(listname,First(Split(TextInput1.Text,";")).Result in fieldname||
     Last(Split(TextInput1.Text,";")).Result in fieldname
     )

     

    //you need to fill in your list name and fieldname.

     

     

    Best regards,

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    I agree with @v-yutliu-msft as long as your filter text will always be only two values separated by a ; 

     

    So let us know if that's true. If it is, the suggestion provided by @v-yutliu-msft will work absolutely fine. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard