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 Gallery based o...
Power Apps
Answered

Filter Gallery based on related table

(0) ShareShare
ReportReport
Posted on by 79

This might be due to a learning curve going over to dataverse, but I am having issues with a table that tracks objects. Many Users can be Assigned to Many Objects. 

I have created a relationship between my table and the User Table. I am able to relate/unrelate users between the tables, but I can’t seem to figure out how to sort a gallery so that the current user only sees objects related to them. 

Nothing special column wise I am simply relating the user to the object. I have been able to look up that user within a comboxbox in the gallery but I cannot filter off it. I’ve tried converting the output of the combo box to a text box, looking it up within a text box, and I’ve tried filtering off the combo box with no luck. I’ve tried to look up how information about the users table to make sure I am using the correct relationship but havnt had much luck other than the generic info on MS learn. Anyone have any ideas on a filter set up or if I’m just flat out doing something wrong? 

example Filter(myTable, lookUp(users, ‘primary email’ = textbox.text)

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

    Hi @hitty08 ,

     

    If the direction is a many-to-one relationship between the Objects table and the Users table, you can try:

     

    Filter(
     'Your objects table',
     'Your user lookup field'.'Primary Email' = User().Email
    )

     

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

     

    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.

    Imran-Ami Khan

  • v-mingkz-msft Profile Picture
    Microsoft Employee on at

    Hi @hitty08,

    Do you want to Filter off the user whose primary email equals to your text input?

    Could you please show more information about your Dateset 'myTable' and 'User' Table in order to help you better?

     

    I assume that you want to filter off the records in myTable whose id is related to the user that primary email = textbox.text in user table.

    If so, please try the formula:

    Filter(myTable, ID != lookUp(users, ‘primary email’ = textbox.text).ID)

     

     

    Best Regards,

    Kyrie

  • hitty08 Profile Picture
    79 on at

    Sorry should have been a bit clearer on the relationship n:n

  • hitty08 Profile Picture
    79 on at

    Sorry first time posting a data-verse question, because this a many to many relationship technically all of the Users are just related to myTable so I have no ID to reference within my original table. 

    myTable N:N relationship with Users Table where I relate the user.

     

    In the text input in the gallery I am currently running the following to filter the other users that are assigned to the same object. 


    On the text input within the gallery -

    lookup(ThisItem.Users,’Primary Email’ = varUsrEmail,’Primary Email’) 

     

    On the items property of the gallery 

    Filter(myTable, varUsrEmail = lookup(Users,’Primary Email’ = TextInput.Text).’Primary Email’)

     

    I just created a one to many relationship with the users table also trying to target the IDs 

     

    - set a global variable to get the current user ID via Office365 users 

    - then I targeted the ‘Application ID’ in the users table 

     

    No luck 

  • Verified answer
    hitty08 Profile Picture
    79 on at

    End up following the guide in this link to resolve filtering a gallery based on related items in a n:n relationship 

     

    https://powerapps.microsoft.com/en-us/blog/option-sets-and-many-to-many-relationships-for-canvas-apps/

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