cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
UmerJaved
Helper III
Helper III

Embeded canvas app into Dynamics 365 model driven form - filter to show only related contacts not working

Hi,

 

I have a model driven account entity form. I want to show related contacts for the account in canvas along there images therefore have added a gallery on the canvas form. The data source for the gallery is "Contacts" and data source for the form is "Accounts".

 

However i want to filter the contacts shown in the gallery to be filtered for the subject account only. Therefore using 'company name' lookup (which is a polymorphic lookup(could be 'account' or 'contact')) on the contact record for filter criteria.

 

The filter doesn't seem to work, instead it shows all the contacts in the system and not just the ones linked to subject account.  I am trying to use the following formulae

 

Filter(Contacts, 'Company Name' = [@ModelDrivenFormIntegration].Item) 

 

Any idea what is wrong here please?

@PowerAddict 

Thanks

2 REPLIES 2
PowerAddict
Super User
Super User

Hi @UmerJaved

 

I am back on the forums after about 5 weeks, so happy to be back and especially since it is an embedded app question!

 

Back to your question, let me first confirm that I got the use case right: 

1. You have an app embedded on the Accounts entity that has a form to display Account details 

2. You have a gallery to show related contacts 

3. You are using this: Filter(Contacts, 'Company Name' = [@ModelDrivenFormIntegration].Item) 

4. But the list of contacts isnt getting filtered

 

Questions: 

1. Are you getting any errors? You may not see the error in the formula bar so would encourage you to go to the App Checker

2. Have you tried something like this as the data source for the gallery? 

LookUp(Accounts, Account = [@ModelDrivenFormIntegration].Item.Account).Contacts

 

Let me know if this helps. 

 

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

Hi  @PowerAddict 

 

  Thanks for the reply.

1:  There is no error in app checker.

 

2:  I just tried the function you suggested however function seem to have syntax error(attached) so i replaced with the ".contact(contact_customer_accounts)" as per intellisence. However upon testing i am not getting any results other then a message "getting data".. 

The data source of gallery is also changed to Accounts following use of this lookup function.

 

The item property of the form is "ModelDrivenFormIntegration.Item" and data source is Accounts.

 

Any other suggestions why it's not working?

Thanks

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,361)