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

How to filter data table embedded to dynamics 365

I need to filter the data table embedded in the dynamics 365 based from the selected lookup value in the Opportunity. 

I have 4 different entities: Opportunity, Account, Regions, Blacklist. Blacklist has a lookup field of Regions and Account has a lookup field of Regions. Account is a lookup field in the Opportunity. In the Opportunity form, Data table of Blacklist is embedded and I need to get the Account Region to filter the data table based from the selected account.

Has anyone encounter the same scenario?

I tried to do the filtering using a dropdown but what I really want is the above scenario. 

Data Table Item: Filter('Blacklist', 'Region'.Region=Dropdown1.Selected.Region)

Dropdown: Region

 

How can I make it work OnVisible of Data Table and using ModeldrivenformIntegation

I'm still new in power apps and I'm not sure how to do it. Any help will be so much appreciated. 

 

2 REPLIES 2
Microsoft
Microsoft

Hi @eb2801 ,

 

Could you please share more details about your scenario? Would you like to filter a data table in model-driven embedded Canvas app base on a LookUp selected value?

 

If so, please first refer to the official doc below which is the guidelines:

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/pass-current-embedded-canvas-app

 

And I found a post with solution form @PowerAddict could be work for your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Embedded-canvas-app-get-the-selected-lookup-...

 

So in your case:

  1. Add another screen in your app.
  2. Add a gallery (Gallery1) of Blacklist with the items property set to Blacklist.
  3. Set Items property of the data table to:

 

Filter(Blacklist, Region=[@ModelDrivenFormIntegration].Item.Region)

 

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-jefferni ,

 

Yup the scenario is close to your understanding, so when I select a LookUp value in Opportunity it will filter the data table.

Actual example:  I open an existing record in Opportunity, I selected a record for Account lookup. 

Behind the scene, I need to get the selected Account Region to filter the Blacklist data table. Blacklist data table has a column "Region" (Region is also a lookup)

 

 

I did try your suggestion but I'm getting an Invalid Argument type error and I can't make it work 😥

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (37,922)