Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Subgrid - how to filter the records shown in the 'add new from existing' button based on a field in the entity to which the grid value is related to


Thank you in advance if you can come up with a solution to this.Hope I have explained my scenario well.Will greatly appreciate if you can help me out soon here:)


I have three entities. Entity A,B and C . C is related to A. and B is related to A. Depending on the value of A within B,the multiple records from C which falls under A should be listed for user to choose from. There is a subgird within A whose datasource is C. There is a subgrid in B whose datasource is C. The view is set such as to 'show only related records'.Entity B has a lookup field which has value of A in B. According to that data,the list of values to choose from for B regarding C is to be filtered. I have been looking into this since a couple of days now.Can anyone help me? C has many-many relationship with A,B ( inorder to include subgrid component in the form)B has many to one relationship with A. C depends on the A. 

Community Support
Community Support

Hi @sangeetha_sn ,

Could you please share a bit more about your scenario?

Do you want to filter the LookUp field available options within your Entity B Form based on the SubGrid related to Entity C?


Based on the needs that you mentioned, I think the "Related Records Filtering" option for the LookUp field (refer to Entity A) in your Entity B could achieve your needs.


You could consider consider edit your Edit B form in classic mode experience, then double click the LookUp field (refer to Entity A), then configure "Related Records Filtering" option for it:


Please check and see if the following two blogs would help in your scenario:


Also please check and see if the following thread link would help in your scenario:


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.

Hi @v-xida-msft ,


Thank you the reply.Let me try to give you a better understanding of my scenario.


Dynamic Filter on Sub grid look up 


What I want to achieve is the filtering of data list in the inline lookup of Sub grid component.


The  three entities Idea,Department and Expected Result. A department can have multiple expected results. An idea falls under a department.The user should be able to add multiple expected results to an Idea .The option list of expected results listed in Idea's subgrid inline lookup should be based on the department of the Idea.


I am developing the App using the Innovation Challenge template provided in the App list in the PowerApps maker portal


App type: Model driven app

My account plan: Power Apps Per User Plan trial

Not applicable

wanting a solution to this too - we are wanting 'Related Records Filtering' for the subgrid component

New Member



The only solution I know of is is using javascript to "replace" the "Add existing" button behaviour. I have never tried...


One example:


But definitely :

MS needs to extend M-M Subgrid "Add existing" button "Lookup View" filtering by allowing to define a filtering comparable to what can be done with a Lookup field directly on a Form.


Helpful resources

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,136)