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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Advanced filter gallery
Power Apps
Answered

Advanced filter gallery

(0) ShareShare
ReportReport
Posted on by 52

hi Expert, 

i have a table named user management in dataverse

NameEmailTeam NameRoleTeam Code
tom harytom.harry@xyz.comAlphaUser16325
tom jerrytom.jerry@xyz.comTangouser636
Beast ModeBeastmode@xya.comCorpAdminCorpA
Bold Manboldman@xyz.comCorpSuperUSerCorpU

 

and i have record list in dataverse which record the item.

 

 

now i have a galllery where i want to filter the REcord list under following condition: 

1. Admin and super user can see all item

2. User and his team can see the item created by their team

3. Filter the item by gender (All, Male, Female) and Status(All, open, close, pending) and organisation

 

you expertise will definately help. 

 

Thank you in advacne 

the Gallery

nimesh898_0-1693572516378.gif

 

Categories:
I have the same question (0)
  • Verified answer
    SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at

    Hi @nimesh898 

     

    I try to create a code how it should look like.

    On your Gallery.Items:

    If(
     LookUp(colUsermangement, Email = User().Email).role = "Admin" || LookUp(colUsermangement, Email = User().Email).role = "SuperUSer",
     Filter(colItems, Gender = Dropdown1.SelectedText.Value, Status = Dropdown2.SelectedText.Value, Organisation = Dropdown2.SelectedText.Value),
     LookUp(colUsermangement, Email = User().Email).role = "User"
     Filter(colItems, CreatedByTeam = LookUp(colUsermangement, Email = User().Email).'Team Name' ,Gender = Dropdown1.SelectedText.Value, Status = Dropdown2.SelectedText.Value, Organisation = Dropdown2.SelectedText.Value)
    )

     
    You only provided the user management table in dataverse because I was missing the other for the created items..

    Please adjust the code accordingly to make it work.

     


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

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

  • nimesh898 Profile Picture
    52 on at

    Hi Thank you for your response but 

    If(
     LookUp('User Managements', Email = User().Email).Role = 1 || LookUp('User Managements', Email = User().Email).Role = 3,
     Filter(Records, Location = ComboBox1_1.Selected.Value, 'Status (crbb3_Status)'.Value = ComboBox1_2.Selected.Value, 'Organizational Id' = ComboBox1_3.Selected.Value),
     LookUp('User Managements', Email = User().Email).Role = 2,
     Filter(Records,'Organizational Id'=LookUp('User Managements', Email = User().Email).'WR Organization Name',Location = ComboBox1_1.Selected.Value, 'Status (crbb3_Status)'.Value = ComboBox1_2.Selected.Value, 'Organizational Id' = ComboBox1_3.Selected.Value))

     

    when i add this record am getting error in this highlighted part. 

    nimesh898_1-1693578902899.png

     

     

     

  • SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at

    Hi @nimesh898 

     

    Youre checking two different columns:

     

    'Organizational Id' = LookUp('User Managements', Email = User().Email).'WR Organization Name'

     

    Is that correct? and what is the error that your getting?

     


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

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

  • nimesh898 Profile Picture
    52 on at

    yeah i have user management table which has a column name organisation Name. 

     

     

  • nimesh898 Profile Picture
    52 on at
    SortByColumns(
     If(
     ComboBox1_1.Selected.Value = "All",
     Filter(
     Records,
     (IsActive = true && 'Created By'.'Primary Email' = User().Email && 'Organizational Id' = ComboBox1_3.Selected.Value) || (IsActive = true && 'Organizational Id' = Dropdown5_1.Selected.Value && 'Status (crbb3_Status)'.Value = Dropdown4.Selected.Value && 'Organizational Id' = ComboBox1_3.Selected.Value)
     ),
     If(
     // User Management Access: Disable access to user role
     Not(
     IsBlank(
     LookUp(
     'User Managements',
     Email = User().Email && Role = 1||Email = User().Email && Role = 3
     )
     )
     ),
     Filter(
     Records,
     (IsActive = true && cr65c_location = ComboBox1_1.Selected.Value && 'Status (crbb3_Status)'.Value = Dropdown4.Selected.Value && 'Created By'.'Primary Email' = User().Email && 'Organizational Id' = ComboBox1_3.Selected.Value) || (IsActive = true && cr65c_location = ComboBox1_1.Selected.Value && 'Organizational Id' = Dropdown5_1.Selected.Value && 'Status (crbb3_Status)'.Value = Dropdown4.Selected.Value && 'Organizational Id' = ComboBox1_3.Selected.Value && 'Status (crbb3_Status)'.Value = Dropdown4.Selected.Value)
     ),
     Filter(
     Records,
     (IsActive = true && 'Start Date' <= Today() && 'Status (crbb3_Status)'.Value = Dropdown4.Selected.Value && cr65c_location = ComboBox1_1.Selected.Value && 'Status (crbb3_Status)'.Value = Dropdown4.Selected.Value && 'Organizational Id' = ComboBox1_3.Selected.Value && 'Status (crbb3_Status)'.Value = Dropdown4.Selected.Value)
     )
     )
     ),
     "crbb3_startdate",
     If(varSortStartD=true,SortOrder.Ascending,SortOrder.Descending)
     )

    i even tried tthis code but still faced the same issue? 

     

  • SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at

    What is the issue/error that its giving?

  • nimesh898 Profile Picture
    52 on at

    i figure it out but thanks for your guidance though 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard