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 a gallery for P...
Power Apps
Answered

Filter a gallery for People column, 2 text columns, and a multi choice column

(0) ShareShare
ReportReport
Posted on by 40

Helly everyone,

I am working on a gallery that I want to have 4 methods of filtering.

First way is through typing the name of the person which is connected to my people column on SharePoint. Second way will be through a choice column filter based on the status of the file. Third and fourth methods will be through text columns (based on the file number and address)

 

My choice column is called Status and is connected to a combo box called "StatusBox"

My text column for file number is called Filenumber and is connected to a text input called "Fileno"

My text column for the address is called AddressCol and is connected to a text input called "Addfile"              XXX

My people column is called Responsible and is connected to a text input called "Assignedto"                       XXX

 

So far I came up with the following which makes the filtering work only for file number column (text column) and status column (choice column). However, I am not sure how to include the other text and people column into this code.

 

 

Items:

 

Search(

Filter('Files List', IsBlank(StatusBox.SelectedItems) || IsEmpty(StatusBox.SelectedItems) || StatusBox.Selected.Value in Status.Value),

Fileno.Text,

"Filenumber"

)

 

 

Your help would be greatly appericiated

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Hi @SinaM ,

     

    You could use the below pattern:

     

     

    Filter(
     'Files List',
    
     CountRows( StatusBox.SelectedItems ) = 0 || Status.Value = StatusBox.Selected.Value,
    
     IsBlank(Assignedto.Text) || StartsWith( Responsible.DisplayName, Assignedto.Text),
    
     IsBlank(Fileno.Text) || StartsWith( Filenumber, Fileno.Text ),
    
     IsBlank(Addfile.Text) || StartsWith( AddressCol, Addfile.Text ),
    )

     

     

    Note if Filenumber number is ever changed to a Number data type rather than Text, change "Fileno.Text" to " Value(Fileno.Text) " (non-delegable).

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up.

  • Verified answer
    SinaM Profile Picture
    40 on at

    Thank you for your answer.

    I had an incompatible error for the status combo box. However, I changed it to this and it worked:

    Filter(
     'Files List',
    
     CountRows( StatusBox.SelectedItems ) = 0 || StatusBox.Selected.Value in Status.Value,
    
     IsBlank(Assignedto.Text) || StartsWith( Responsible.DisplayName, Assignedto.Text),
    
     IsBlank(Fileno.Text) || StartsWith( Filenumber, Fileno.Text ),
    
     IsBlank(Addfile.Text) || StartsWith( AddressCol, Addfile.Text ),
    )

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 765 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 272

Last 30 days Overall leaderboard