cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
FabFab
Level: Powered On

Linking Accounts to Contacts, Dynamics 365, fields

Hy,

i'm trying to filter 2 galleries in PowerApp.

 

The 2 source of the galleries are: 

  • the account entity of Dynamics 365
  • the contact entity of Dynamics 365

What i'm trying to achieve is that by clicking on an account from gallery 1,  I can navigate to gallery 2 where i can display all the contacs that are associated to the account i select in gallery 1.

 

I'm having problems Smiley Happy

The formula that i have applied to gallery 2 is the following:

 

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

 

But the system complaing by saying " The requested operation is invalid. Server Response: A binary operator with incompatible types was detected. Found operand types 'Edm.Guid' and 'Edm.String' for operator kind 'Equal'.

 

Probably i'm messing with data types that are diffent.

 

But, what fields shall i use to achieve the above?

 

Thank you

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Isaac_Magnetism
Level: Powered On

Re: Linking Accounts to Contacts, Dynamics 365, fields

This is because Company Name is a lookup field in Dynamics 365 meaning that the value stored is just the GUID of the Record it references rather than the string itself.

 

This means you need to compare the 'Company Name' to Account, which is the GUID of the account record, as shown in this block of code.

 

Filter(Contacts,GUID('Company Name') = Gallery1.Selected.Account)
3 REPLIES 3
Isaac_Magnetism
Level: Powered On

Re: Linking Accounts to Contacts, Dynamics 365, fields

This is because Company Name is a lookup field in Dynamics 365 meaning that the value stored is just the GUID of the Record it references rather than the string itself.

 

This means you need to compare the 'Company Name' to Account, which is the GUID of the account record, as shown in this block of code.

 

Filter(Contacts,GUID('Company Name') = Gallery1.Selected.Account)
FabFab
Level: Powered On

Re: Linking Accounts to Contacts, Dynamics 365, fields

It worked. Thank you so much for the suggestion.

neds
Level: Powered On

Re: Linking Accounts to Contacts, Dynamics 365, fields

This isn't working for me.  I am attempting to do the identical thing with two galleries based on the Accounts and Contacts entities in Dynamics. The filtered Gallery doesn't return anything and shows this error.

 

"Delegation warning. The "Filter" part of this formula might not work correctly on lage data sets."

 

This is a test so I don't have a large number of contacts (50), but there are a large number of accounts (4,000). Does this not work for reasonably normal accounts or contacts?  ie over 1,000?

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 37 members 4,002 guests
Please welcome our newest community members: