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 / Get Value of Related E...
Power Apps
Answered

Get Value of Related Entity for Display in Embedded App

(0) ShareShare
ReportReport
Posted on by 74

Hi,

 

I've been wasting too much time on what should be a simple task.  I have an embedded app that I'm trying to display field data from a related entity.

 

Here's the scenario:

  • I am creating an embedded app on an Order entity.  
  • Order has a many-to-one relationship with Account.
  • I would like to display a label: "Order for: [Account Name]"
  • The Account is determined when an Order is created by selecting from an Account lookup field in the model-driven app.  Thhe embedded app is editing an existing Order.
  • My label text formula is: "Order For: " & LookUp(Accounts, Account = [@ModelDrivenFormIntegration].Item.'Account Order'.Account).'Account Name'
  • Account is the unique identifier for the Accounts entity.  'Account Order' is the lookup field in the Order entity.
  • The formula always returns an empty value.  The relationship exists, though, as it appears correctly in the model-driven app as well as in related views.

I know I'm missing something simple but I cannot figure this one out.  It appears [@ModelDrivenFormIntegration].Item.'Account Order' is always empty even though the relationship exists and was established when the order was created.  I would appreciate any help.

 

Thanks in advance.

 

Dan

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Try this out:
    LookUp(Orders, Order = [@ModelDrivenFormIntegration].Item.Order]).'Account Order'.'Account Name'

     

    There are a bunch of blog posts I have written about embedded canvas apps: 

    1. https://thepoweraddict.com/overcoming-top-5-challenges-with-embedded-canvas-apps/

    2. https://thepoweraddict.com/related-entity-fields-in-an-embedded-canvas-app/

    3. https://thepoweraddict.com/testing-embedded-canvas-apps/

    4. https://thepoweraddict.com/displaying-related-entity-fields-in-an-embedded-canvas-app/

     

    Also, I have a session lined up for next week where I will talk about challenges with embedded canvas apps. Here is the link: 

    https://www.xrmvirtual.com/meeting-details/?id=c85adab1-cb4d-ea11-a812-000d3a102d9a

     

    Subsequent to that session, I will be creating a blog that summarizes all the challenges and tricks in one post. 

    Let me know if that works.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    https://thepoweraddict.com

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    @djallen

    Did this solve your issue? Let me know if you are still facing issues.

    Thanks,
    Hardit Bhatia
    https://thepoweraddict.com
  • djallen Profile Picture
    74 on at

    Thanks for the reply.  This doesn't work, either though:

    LookUp(Orders, 'Order Id' = [@ModelDrivenFormIntegration].Item.'Order Id']).'Account Order'.'Account Name'

     

    I can retrieve all fields from the Order but no related entity fields.  So, for example, this works:

    LookUp(Orders, 'Order Id' = [@ModelDrivenFormIntegration].Item.'Order Id']).'Created On'

     

    This fails to return any data:

    LookUp(Orders, 'Order Id' = [@ModelDrivenFormIntegration].Item.'Order Id']).'Account Order'.'Account Name'

     

    On the Account entity in CDS I have a One-to-many relationship to my Order entity.  

    On the Order entity in CDS I have a Many-to-one relationship to the Account entity.  

    Thanks again,

    Dan

  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    In the App Settings, is the Explicit Column setting set to true? Can you try with setting it to false?

    Also, another approach that you can take is to have a gallery of Orders and set the Items property of the gallery to:
    LookUp(Orders, 'Order Id' = [@ModelDrivenFormIntegration].Item.'Order Id'])

    You can set the Visible property of the gallery to false. Then try to fetch the Account Name using:

    First(Gallery.AllItems).Account.'Account Name'

    Let me know if this doesn't work. If not, I have one other trick that we can try.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    https://thepoweraddict.com
  • djallen Profile Picture
    74 on at

    Changing the Explicit Column setting didn't do anything.  However, your suggestion for adding a gallery did work.

     

    Also, another approach that you can take is to have a gallery of Orders and set the Items property of the gallery to:
    LookUp(Orders, 'Order Id' = [@ModelDrivenFormIntegration].Item.'Order Id'])

    You can set the Visible property of the gallery to false. Then try to fetch the Account Name using:

    First(Gallery.AllItems).Account.'Account Name'

     

    Not very intuitive but at least it works!  I guess I can add another screen and add needed galleries for the app and just keep it hidden from the user.

     

    Thanks for the help!

     

    Dan

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Good luck with the rest of the app! Feel free to reach out in case of any questions!

    Also, I would keep the gallery on the same screen for performance issues. If its on a different screen, the app has to load that screen as well. And you can still hide it even if it is on the same screen.

    Thanks!
    Hardit Bhatia
    https://thepoweraddict.com
  • djallen Profile Picture
    74 on at

    Cool. Thanks for the tip.

     

    Dan

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard