Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Filter. gallery view based on user selection

(0) ShareShare
ReportReport
Posted on by 203

Hi,

 I have a gallery where, based on the user selection, the filter will be different.  When the user selects the option that they want to see (from an icon), the variable is updated with the icon value and this will be used in the filter.  But I'm sure the format in my items field is completely wrong!

 

Screen Shot 2021-03-19 at 13.00.58.png

 

My formula is:

Sort(
If(GallView = "1st Approval (Awaiting Price)",
Filter('Travel Approval Process','Pre-approved'.Value = "Approved" And 'Travel Approval Process',Approved.Value = "Pending")
,
If(GallView = "2nd Approval (Awaiting Ticket Issuance)",
Filter('Travel Approval Process',Approved.Value = "Approved" And 'Travel Approval Process','Tickets Issued'.Value= "No")
,
'Travel Approval Process')
),
Created,Descending)

Categories:
  • SaiAnugrah_7860 Profile Picture
    2 on at
    Filter Gallery Based on the User and user location mentioned in powerapps from sharepoint list

    I am building a reception management system . 

    When  the receptionist open the apps she needs to see the visitors of her current location . 
    For example : i have a list with receptionist email and their location .
    john@xyz.com --> India 
    Jack@xyz.com -- > USA 

    So when John logs in i want to see the data of only India and not USA similarly vice versa . Please suggest i also have other filter for the gallery that are working fine based on locations , name , time , date etc . i need to fit in my current scenario additional into my gallery items property .  Any suggestion would be highly appreciated .

  • StephCORKING Profile Picture
    203 on at
    Re: Filter. gallery view based on user selection

    Hi @eka24 

     

    Brilliant!! 

     

    thank you so much 🙂

     

    Steph

  • Verified answer
    eka24 Profile Picture
    20,921 on at
    Re: Filter. gallery view based on user selection

    Try this modified formula. If you still have issues, clarify if you have two Galleries and also state the code for the variable:

     

    Sort(
    If(GallView = "1st Approval (Awaiting Price",
    Filter('Travel Approval Process','Pre-approved'.Value = "Approved" And Approved.Value = "Pending")
    ,
    If(GallView = "2nd Approval (Awaiting Ticket Issuance)",
    Filter('Travel Approval Process',Approved.Value = "Approved" And 'Tickets Issued'.Value= "No")
    ,
    'Travel Approval Process')
    ),
    Created,Descending)

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1