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 Pages / Filter Lookup bases on...
Power Pages
Suggested Answer

Filter Lookup bases on N:N relationship

(0) ShareShare
ReportReport
Posted on by 2
HEllo , 

I have a 4 tables :
Product table (virtual table from SAP)
Contact table (standart table)
Contact-Product  (Contains the contact and product information as I cannot create N:N relationship for virtual tables)


In another table called Item I have a lookup to Product , so it shows all the products, 

I want to filter this lookup to show only the product the user have access to based on the Contact-product table

How I acheive that, I dont want to create relationship between Contact-product and Item , because  the contact product it's not used in the  SAP, 


 
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 1 on at
    Pls try the following:
     
    In your Item lookup's View definition, use FetchXML to filter products based on the current user's access:
    <fetch>
      <entity name="product">
        <attribute name="productid" />
        <link-entity name="contact_product" from="productid" to="productid" link-type="inner">
          <filter>
            <condition attribute="contactid" operator="eq" value="@UserId" />
          </filter>
        </link-entity>
      </entity>
    </fetch>
     

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!

Leaderboard > Power Pages

#1
Hammed Profile Picture

Hammed 22

#2
Lucas001 Profile Picture

Lucas001 21 Super User 2026 Season 1

#3
DP_Prabh Profile Picture

DP_Prabh 19

Last 30 days Overall leaderboard