I'm working on something and I am unsure how to approach a solution.
I have working solution for filtering a table. However I want to use the filter results of that table to filter a different table.
if My first table looks like this:
JOHN PLUMBER
MIKE PLUMBER
MARY CARPENTER
SALLY CARPENTER
BOB SOLDIER
JUAN DENTIST
If my first filtered table gives me the following results (based on other columns):
JOHN PLUMBER
MARY CARPENTER
BOB SOLDIER
I want to be able to use this pairing of key fields to filter a different table, so if my second table was
JOHN PLUMBER MANCHESTER
JOHN PLUMBER CONCORD
MIKE PLUMBER CONCORD
MARY CARPENTER SMITHFIELD
SALLY CARPENTER GREENFIELD
BOB SOLDIER IRAQ
JOHN DENTIST SPRINGFIELD
my filtered results end up being
JOHN PLUMBER MANCHESTER
JOHN PLUMBER CONCORD
MARY CARPENTER SMITHFIELD
BOB SOLDIER IRAQ
I get how to do this for one column. I could make it so if I wanted to filter for "CARPENTER" I get all the CARPENTERS. I can also make if I want all the PLUMBERS named JOHN , i get the one result.
What I don't understand (hence I'm not adding PSUDO-code) , is how i can filter on the Forgegn Key Pair (or maybe more columns)
So I'd want from the second table is all the Records that have
This would bring back four rows in the table. I don't want Mike because even though he's a PLUMBER he's not a result of the original filter. (which perhaps was filtered on zip code and years of service which are unrelated to the second
table.
I hope I am explaining this well. If I'm still being confusing let me know. In the end I want to use the list of key pairs to filter a different table only for those matching key pairs.