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 / Filter Gallery based o...
Power Apps
Unanswered

Filter Gallery based on many to one relationship

(0) ShareShare
ReportReport
Posted on by 92

I have a Gallery Filter based on two Dataverse tables, one is "CSHHR_LeaveRecords," and the other is "CSHHR_Database." The "CSHHR_LeaveRecords" table has a column with duplicate employee email," and the "CSHHR_Database" table has a column with unique employee emails. And in the "Staff Database," there is a "StaffsInfo" column that uses a Many-to-One Lookup. However, when using this column for lookup, it's not retrieving any content, and there are no formula errors either.

 

 

 

Filter(
 CSHHR_LeaveRecords,
 Upper(Requester) = Upper(_MyMail),
 StaffsInfo.'Branch Name' = _Branch
)

 

 

 

 Snipaste_2023-08-16_20-11-35.jpgSnipaste_2023-08-16_20-18-15.jpgSnipaste_2023-08-16_20-18-57.jpg

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @TW001 - could you clarify your post.

     

    You mention you have two Dataverse Tables, "CSHHR_LeaveRecords," and "CSHHR_Database", but then you mention another Table called "Staff Database", and then in your screenshot you have a table called "CSHHR_StaffDatabase". 

     

    1. Is "CSHHR_Database", "CSHHR_StaffDatabase", and "Staff Database" the same table?

    2. Which table does the "Requestor" column reside in? I notice your using "Requestor" in your Filter, but I do not see that column in your image of the CSHHR_LeaveRecords Table.

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

     

    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

  • TW001 Profile Picture
    92 on at

    1. Sorry for confusing, "CSHHR_StaffDatabase", and "Staff Database" is same table, I made a mistake here.

    2.  "Requestor" is in both of the tables. "Requestor" in "CSHHR_StaffDatabase" is primary name column.

    Snipaste_2023-08-17_08-59-13.jpg

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @TW001 - could you please paste the code you're using to generate _MyMail and  _Branch?

     

    If you remove _MyMail and _Branch and replace them with hardcoded values, are any results displayed?

  • TW001 Profile Picture
    92 on at

    Tried before but nothing shows up

    Snipaste_2023-08-17_10-58-33.jpgSnipaste_2023-08-17_11-06-32.jpgSnipaste_2023-08-17_11-07-44.jpg

  • TW001 Profile Picture
    92 on at

    Attached same requester mail. Nothing shows up.

    TW001_0-1692245546398.png

     

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @TW001 then the likely cause is because the Upper function is not a delegable function when used in a Filter. Consider using the StartsWith function which is case insensitive. For example:

     

    Filter(
     CSHHR_LeaveRecords,
     StartsWith(
     Requestor,
     _MyMail
     ),
     StaffsInfo.'Branch Name' = _Branch
    )

     

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

     

    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

     

  • TW001 Profile Picture
    92 on at

    I tested but it's not this reason. Do I need to fill out something in LookUp column?

    TW001_0-1692286455693.png

    TW001_1-1692286565916.png

     

     

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @TW001 - you're syntax looks fine to me. Can you check if that column contains any irregular characters/spaces?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard