Skip to main content

Notifications

Community site session details

Community site session details

Session Id : VtXiMcwyWC93iAt7kFir02
Power Apps - Building Power Apps
Answered

Embedded canvas app get the selected lookup field value

Like (0) ShareShare
ReportReport
Posted on 21 Nov 2019 22:06:30 by 55

Please see the screenshots, I used the following examples from previous messages and Microsoft guides and any variant that I could think of:

LookUp(Accounts, Account = GUID(First(ModelDrivenFormIntegration.Data).ItemId)).'Primary Contact'.'Full Name'
LookUp(Accounts, Account = ModelDrivenFormIntegration.Item.Account).'Primary Contact'.'Full Name' 

I have an embedded a canvas app for Work Order entity and every Work Order has a Vessel associated with it. I am aware that I can retrieve any field from the work order, except the lookup fields and vessel is a look up field in the Work Order record. Please see embedded 3 screenshot, where I am trying to retrieve the vessel identifier. I have entered the formulas given as examples, but they give me errors - I thought it may be because its a list of items (which by the way show if I click on the dropdown) , so I added a label and entered the following: 

LookUp('Work Orders','WO Number'=[@ModelDrivenFormIntegration].Item.'WO Number').'Service Account'.'Account Name'

As you can see in attachment, I have no errors but no value is returned. No matter what field from the vessel entity I am trying to retrieve , the results are the same. I attached another example with no lookup:  [@ModelDrivenFormIntegration].Item.Vessel.'Hull Number' 

I know answers have been provided in previous posts and even guidance from Microsoft, but it does not work for me....

What should I do?

  • Community Power Platform Member Profile Picture
    on 29 May 2020 at 12:32:18
    Re: Embedded canvas app get the selected lookup field value

    So if I have a embedded canvas apps with a gallery of products. I would like to select a price list in the model driven app and have the products related to the price list to show in the gallery. 

  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 29 May 2020 at 05:30:47
    Re: Embedded canvas app get the selected lookup field value

    Can you please explain what you mean by controlling the gallery? 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • Community Power Platform Member Profile Picture
    on 28 May 2020 at 20:40:59
    Re: Embedded canvas app get the selected lookup field value

    How can I control a gallery of products with selecting a field in the model drive app using a embedded powerapps? My user want a gallery of products they can pick from but I want the model driven app to control the gallery.

  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 22 Nov 2019 at 17:38:42
    Re: Embedded canvas app get the selected lookup field value
    Glad I could help! Good luck with the rest of the app! Feel free to reach out in case of any questions!

    Hardit Bhatia
    https://thepoweraddict.com
  • em_sc Profile Picture
    55 on 22 Nov 2019 at 14:46:35
    Re: Embedded canvas app get the selected lookup field value

    Worked like a charm. Excellent, thank you!

  • Verified answer
    PowerAddict Profile Picture
    7,314 Most Valuable Professional on 22 Nov 2019 at 04:25:38
    Re: Embedded canvas app get the selected lookup field value
    Ok try this.
    1. Add another screen in your app (don't worry about its UI, we wont expose tha screen to the end user).
    2. Add a gallery (Gallery1) of work orders with the items property set to Work Orders. Make sure you see a list of work orders
    4. Now set the items property of this gallery to something like this: Filter('Work Orders','WO Number'=[@ModelDrivenFormIntegration].Item.'WO Number')
    5. Now in your main screen wherever you want to reference your work order, use something like this: First(Gallery1.AllItems) so for work order number it would be First(Gallery1.AllItems).'WO Number'

    Let me know how this goes.

    ---
    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
  • em_sc Profile Picture
    55 on 22 Nov 2019 at 03:48:21
    Re: Embedded canvas app get the selected lookup field value
    Yes, I am aware of that also. I tested with labels and fields other than look ups and it worked, I also checked in D365 the corresponding work order number to have a vessel associated with it. Awaiting your input, thank you.
  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 21 Nov 2019 at 22:11:53
    Re: Embedded canvas app get the selected lookup field value

    I should be able to help you out with any embedded canvas app issues. 

     

    One simple question before we get started though: have you tested this app from within a model-driven app form or are you just expecting to see values within the editor? Embedded canvas apps need not necessarily show values within the editor (most of the time they display values for the 1st record of the entity that the embedded canvas app is tied to). 

     

    So let's get this out of the way first. If it still doesn't work, I have another way that I think should make it work but let's hear back from you first. 

     

    ---
    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://www.thepoweraddict.com

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard