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 / Filtering Gallery by C...
Power Apps
Unanswered

Filtering Gallery by Current User and a Related Data Field

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

I built an app and now I would need to filter the gallery by the current user and by the category that the user is assign to.

 

Table 1 has the fields Category, current user's email address

Table 2 has the fields Category, assigned user's email address

A user can be assigned to multiple categories.

 

How could I accomplish this?

 

Thank you for the help in advance!

 

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Example:

    Filter( Your_List, 'Created by'.Email = User().Email)

    Instead of 'Created by' you can use other fileds such as 'Assigned to', 'Modified by'. That field MUST be a Person field or contains the email

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • zorban Profile Picture
    8 on at

    Thanks @Nogueira1306, but this does not satisfy the requirements. It does not include the filter for the category that the user is assign to.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Filter( Your_List, 'Created by'.Email = User().Email, Cattery = "Category")

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • zorban Profile Picture
    8 on at

    Thanks @Nogueira1306, but this still does not satisfy the requirements. It does not include the relationship for the category and the user that is assign to.

  • v-bofeng-msft Profile Picture
    on at

    Hi @zorban :

     Do you want to get something like this?

    Filter(
     Table1,
     CurrentUsersEmailAddress=User().Email &&
     Category in Filter(Table2,AssignedUsersEmailAddress=User().Email).Category
    )

    Best Regards,

    Bof

  • zorban Profile Picture
    8 on at

    Thanks @v-bofeng-msft ! It is very close, but still getting an error: The specified column is not accessible in this context." The error is for this part of the expression:

    Filter(Table2,AssignedUsersEmailAddress=User().Email).Category
  • v-bofeng-msft Profile Picture
    on at

    Hi @zorban :

    Could you tell me the exact names and data types of these four fields? Also do they allow multiple selection?

    vbofengmsft_0-1642727872582.png

    Best Regards,

    Bof

  • zorban Profile Picture
    8 on at

    Hi @v-bofeng-msft ,

     

    Table1 Category Text, Current user email Text

    Table2 Category Lookup, assigned user email Email

     

    I also created the category as a text filed on Table2 but getting the same error.

    One record can have only one category on Table1. One user email can be assigned to multiple categories.

    Thanks for the help!

     

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