cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Need help on getting Account Name of an account from an Opportunity in Canvas app

Hi Power Apps Community,

 

My issue is that I could not get the value of Account Name field of Account entity in my canvas app.

 

As I know that Power Apps does not allow to get value of a field from an related entity.

 

So I tried the following ways to get Account name from an opportunity (ModelDrivenFormIntegration refers to Opportunity entity)

1. LookUp(Accounts, accountid = [@ModelDrivenFormIntegration].Item.Account, 'Account Name')

2. LookUp(Accounts, Account = [@ModelDrivenFormIntegration].Item.Account, 'Account Name')

3. First(Filter(Accounts, accountid = [@ModelDrivenFormIntegration].Item.Account)).'Account Name'

4. First(Filter(Accounts, Account = [@ModelDrivenFormIntegration].Item.Account)).'Account Name'

 

The result is always empty

Screen Shot 2020-04-25 at 3.21.30 PM.png

All Opportunities in Sales application have an related account

Screen Shot 2020-04-25 at 3.37.08 PM.png

 

I was also wondering if LookUp function works properly, so i made a following small test, and Account Name shown up.

Screen Shot 2020-04-25 at 3.21.49 PM.png

 

So I guess the root cause lied in the condition of LookUp or Filter function but I don't know how to fix it.

 

Look forward to your solution / advice.

 

Many thanks,

Nhan

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @kiendao911990 :

Could you tell me what the relationship is between opportunity and Account? N:1? Or 1:N ? Or N;N?

Firstly, let me explain why the result is always empty.

The point is the ModelDrivenFormIntegration control does not provide a value for fields of a related entity.

So the result of  [@ModelDrivenFormIntegration].Item.Account is an empty table.

Finally, Ive made some test for your reference:

I assume the relationship between opportunity and Account is N;1.

 

LookUp(Opportunities,Opportunity=[@ModelDrivenFormIntegration].Item.Opportunity).Account.'Account Name'

 

 

The point is going back to your data source(Opportunity) to find the specified record to refer to the value of the relevant entity.

I think this link will help you a lot:

Known issues and limitations with embedded canvas apps

Best Regards,

Bof

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @kiendao911990 :

Could you tell me what the relationship is between opportunity and Account? N:1? Or 1:N ? Or N;N?

Firstly, let me explain why the result is always empty.

The point is the ModelDrivenFormIntegration control does not provide a value for fields of a related entity.

So the result of  [@ModelDrivenFormIntegration].Item.Account is an empty table.

Finally, Ive made some test for your reference:

I assume the relationship between opportunity and Account is N;1.

 

LookUp(Opportunities,Opportunity=[@ModelDrivenFormIntegration].Item.Opportunity).Account.'Account Name'

 

 

The point is going back to your data source(Opportunity) to find the specified record to refer to the value of the relevant entity.

I think this link will help you a lot:

Known issues and limitations with embedded canvas apps

Best Regards,

Bof

View solution in original post

Highlighted
New Member

Guangzhou Aoqun Brush Industry Technology Co., Ltd. is a large brush manufacturing enterprise combining design, development, production, sales and service.

Brush, Strip Brush, Cleaning Brush, Roller Brush and different other products with "Aoqun" brand sell well in more than 50 countries around the world, professional in over 30 industries, also cooperating with the world-famous enterprises, like CRRC Group, Schinder, Hitachi, Kone and Combi etc.

Adhering to the tenet that "Integrity shapes our futures'', with the oringinal spirit of "Profession, Concentration and Focus", persisting in scientific management, pursuing superior quality, Aoqun Company always produces every piece of satisfying brush with heart. We are committed to build an excellent brand of our nation, and make more contribution to "Made with Wisdom in China".

https://www.aoqunbrush.com/

Highlighted

Hi Bof,

 

The relationship is N:1.

Thank you very much for your help.

I can get the value of Account Name field now.

 

Cheers,

Nhan

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,680)