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.
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:
So in your case:
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 😥
User | Count |
---|---|
225 | |
101 | |
93 | |
57 | |
31 |
User | Count |
---|---|
284 | |
116 | |
109 | |
63 | |
57 |