cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

How to get data from two different Entities through CRM in Powerapps

I am Using Dynamics CRM as a Datasource in powerapps.

In Screen1, Gallery1, I am Displaying all the Account Names from Account Entity.

In Screen2, EditForm1, CustomerName Datacard(Textbox), ContactName Datacard(DropDown) from Contact Entity.

When I select an Account Name from Gallery1, then CustomerName DatacardValue(Textbox) : Gallery1.Selected.Account Name

Based on this CustomerName I should filter ContactName(DropDown) for which I wrote: Filter(Contacts, CustomerName = CustomerName DatacardValue.Text), Value:ContactName.

 

But I am not getting ContactNames of Selected Customer. Can anyone help me, how to filter Contact Names(from Contact Entity) based on Selected Account Name(from Accounts Entity).

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to get data from two different Entities through CRM in Powerapps

Hi @Chandu ,

Could you please share a bit more about the "CustomerName" field in your Contacts Entity? Is it a LookUp type column, which references values from your Account Entity?

Further, could you please share a bit more about the "ContactName" column in your Contacts Entity? Is it a custom field?

 

If the "CustomerName" field is a Text type field in your Contacts Entity, and the "ContactName" field is also a custom field, I think the formula you provided is right. Is there some error message with the Filter formula?

 

Have you taken a try with the following formula within the Items property of the Contact Name Dropdown box:

Filter(Contacts, CustomerName = Gallery1.Selected.'Account Name')

set the 'Contact Name' as display value within the Dropdown box.

 

If the "CustomerName" filed is a Text type field in your Contacts Entity, you could also consider take a try to set the Items property of the Contact Name Dropdown to following:

Filter(Contacts, CustomerName = CustomerNameDataCardValue.Text).'Full Name'

Note: The 'Full Name' column in Contacts Entity is used to store the contact name.

 

If the CustomerName field is actually a LookUp field in your Contacts Entity, which references values from the Account Entity, please consider set the Items property of the Contact Name Dropdown box to following:

Filter(Contacts, CustomerName.Account = Gallery1.Selected.Account).'Full Name'

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: How to get data from two different Entities through CRM in Powerapps

Hi @Chandu ,

Could you please share a bit more about the "CustomerName" field in your Contacts Entity? Is it a LookUp type column, which references values from your Account Entity?

Further, could you please share a bit more about the "ContactName" column in your Contacts Entity? Is it a custom field?

 

If the "CustomerName" field is a Text type field in your Contacts Entity, and the "ContactName" field is also a custom field, I think the formula you provided is right. Is there some error message with the Filter formula?

 

Have you taken a try with the following formula within the Items property of the Contact Name Dropdown box:

Filter(Contacts, CustomerName = Gallery1.Selected.'Account Name')

set the 'Contact Name' as display value within the Dropdown box.

 

If the "CustomerName" filed is a Text type field in your Contacts Entity, you could also consider take a try to set the Items property of the Contact Name Dropdown to following:

Filter(Contacts, CustomerName = CustomerNameDataCardValue.Text).'Full Name'

Note: The 'Full Name' column in Contacts Entity is used to store the contact name.

 

If the CustomerName field is actually a LookUp field in your Contacts Entity, which references values from the Account Entity, please consider set the Items property of the Contact Name Dropdown box to following:

Filter(Contacts, CustomerName.Account = Gallery1.Selected.Account).'Full Name'

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,478)