Adding a field into a subpanel select box

Hi All, I am creating a new module (let’s call this one module A)(in module builder), that links to another module (let’s call this one module B)(one to many relationship).
What I want to do is when I have the subpanel for Module B showing, and click on select to select records, I want to be able to filter on Module A, to see only module B records related to their parent record in Module A.
How can I do this?