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 on N:N ...
Power Apps
Unanswered

Filter gallery on N:N relationship

(0) ShareShare
ReportReport
Posted on by

Hi All

 

I have a question.

 

I have the following use case:

 

Dataverse tables are CLIENTS / TECHNICIANS / CAMPAIGNS

 

The Technicians & Campaigns are a N:N relationship.

 

Is it possible to filter a canvas app gallery to show only the campaigns to where the logged in user(technician) is related to?

 

 

Can't seem to find this.

 

Thank you in advance & kind regards

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Anonymous ,

    I have a blog on many-to-many relationships - you need to make a Collection as the Gallery Items.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    on at

    Hi @WarrenBelz 

     

    You are a lifesaver! 😄

     

    Thank you!

  • Community Power Platform Member Profile Picture
    on at

    Hi @WarrenBelz 

     

    I tried replicating the article but I seem to have no luck, or I am missing something.

     

    1. We have a backoffice application where our "Campaigns" are registered.

    2. We assign multiple technicians to a certain campaign.

     

    We now have a mobile application for the technicians.

     

    When a technician logs into the mobile application, I want to Filter the starting page gallery immediately, based on the fact that the user().Email is present in the Related Technicians for the campaigns.

     

    This way the technicians on the mobiles, only see the campaigns which they are related to.

     

    Can't seem to make this to work.

     

    Thank you in advance for your response.

     

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Anonymous ,

    Please share (in Text) the code you are using that does not work

  • Community Power Platform Member Profile Picture
    on at

    Hi @WarrenBelz 

     

    None, Thats my Issue.

     

    I need to check if the logged in user is in the 'Related Technicians', so he only sees his related campaigns, and i just don't see the logic.

    NativeNass_1-1642784580571.png

     

     

     

     

    I tried the way that i could figure it would work:

    NativeNass_2-1642784624482.png

     

    This does not give me an error that i am doing wrong things here, but i returns no data at all.

     

    Thank you in advance & kind regards

     

     

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Anonymous ,

    Your code is a One-to-many and will work up to your Delegation limit (the blue lines are a Delegation warning, not an error). Also please remember to post code also in Text.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @WarrenBelz 

     

    At the moment in the onvisible property of my screen i collect all campaigns with a certain status.

     

    On my Gallery(on my startscreen), I have the following Formula:

    NativeNass_0-1642865083960.png

    There should b 2 records.

     

    In my gallery, it shows 2 records indeed, but without any attached information + the delegation warning for the relationship which I do not like.

    NativeNass_1-1642865254996.png

     

    I'm starting to think I need to extend the 'Campaign' table in Dataverse with  5 extra lookup columns for each possible technician, but that would be malpractice in my opinion.

     

    Thank you & kind regards

     

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @WarrenBelz 

     

    At the moment in the onvisible property of my screen i collect all campaigns with a certain status.

     

    On my Gallery(on my startscreen), I have the following Formula:

    NativeNass_0-1642865083960.png

     

    ForAll(colCampaigns, LookUp(colCampaigns, User().Email in Technicians.Email))

    There should b 2 records.

     

    In my gallery, it shows 2 records indeed, but without any attached information + the delegation warning for the relationship which I do not like.

    NativeNass_1-1642865254996.png

     

    I'm starting to think I need to extend the 'Campaign' table in Dataverse with  5 extra lookup columns for each possible technician, but that would be malpractice in my opinion.

     

    Thank you & kind regards

     

     

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Anonymous ,

    Firstly in is not Delegable, hence the warning. You have also now mentioned Dataverse - I am a SharePoint user, so I am not sure how accurate my advice will be.

  • Community Power Platform Member Profile Picture
    on at

    Hi @WarrenBelz 

     

    I'm sorry I thought I mentioned that.

     

    Thank you for the effort though, I have decided to instead of using the OOB N:N capabilities of Dataverse, I create Custom N:N tables.

     

    I'm not fully confident in the OOB N:N after this issue 🙂

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