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 / Nested LookUp among 4 ...
Power Apps
Unanswered

Nested LookUp among 4 tables.

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

ER.JPGHi All,

I want to get ProductTypeId of the ProdType table from a gallery in which the data source is the Complaint table. How can get that?
Thank You.

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Could you please share more details about your scenario? What is your data source, Dataverse or anything else? If it's Dataverse, then you will be able to get the ProductTypeId quite easily. So, you have a Gallery that Items is the Complaint table, and if you want to display ProductTypeId on a Label in the Gallery, the formula for Text property of this Label is:

    ThisItem.PurchaseId.ProductID.ProdTypeID.ProdTypeID

     

    Best regardes,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-jefferni,
    Thanks for your response.

    It's showing an error. Multiple levels of many-to-one relationship expansion aren’t supported.

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Anonymous ,

     

    Can you try the following code?

     

    With(
     {
     //Assuming Complaint Table is stored as Gallery on screen. Textbox is also fine, replace if needed
     ProductLookUpID : If(!IsBlank(ThisRecord.Purchase), 
     LookUp(Purchases, PurchaseID = ThisRecord.PurchaseId, ThisRecord.ProductID), Blank())
     },
     With(
     {
     ProductTypeLookUpID: If(!IsBlank(ProductLookUpID), 
     LookUp(Product, ProductID = ProductLookUpID, ThisRecord.ProdTypeID), Blank())
     },
     If(!IsBlank(ProductTypeLookUpID), 
     UpdateContext({varProdType: LookUp(ProdType, ProdTypeId = ProductTypeLookUpID, ThisRecord.ProdTypeName) }),
     UpdateContext({varProd: Blank() })
     )
     )
    );

     

     

    Please make field changes and column name wherever required.

    Hope this helps

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard