Forum Discussion

AndreaPahor's avatar
AndreaPahor
Qrew Cadet
7 years ago

Filter lookup results

I have a "proposal" table that has lookup fields for "customer" (from "customer list" table) and "customer contact" (from "customer contact" table).

In the "proposal" table, I want to filter "customer contact" to show only contacts from the "customer" selected . . . i.e. I don't want the entire customer list to appear in the lookup.

There are multiple customer contacts for a single customer.

Is it possible to filter a lookup ("customer contact") based on a separate lookup ("customer") in the same form?
  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain

    What you're wanting is the conditional drop down selection list. You already have your two parent tables set up: Customer List and Customer Contacts.

    The relationship would go like this:
    Customer List >> has many >> Customer Contacts.
    Customer List >> has many >> Proposals.
    Customer Contacts >> has many >> Proposals.

    In Proposals you will have Related Customer List, and Related Customer Contacts.

    In the Proposals table, go to the properties for Related Customer Contacts and establish Related Customer List as the parent to be selected first.

    Be sure that when you are creating the Customer List records, that you select the appropriate Customer Contact lookup that is its parent.