Forum Discussion

MichelleL's avatar
MichelleL
Qrew Trainee
8 months ago

QB equivalent of VLOOKUP

I can't for the life of me figure out what I'm doing wrong here, as I know I've made it work before, in forms/tables that no longer exist, sadly. 

I have a table filled out via a form. The user will select a category from a dropdown menu. I have another field that I need to auto-populate with the current contact (who will be a quickbase user) for that category. I have another table that stores the categories and current contact. I set up the relationship, but all my attempts to get the contact field in the main table to look up the category, find it in the second table, and return the relevant contact have failed. 

Can someone point me in the direction of a simple explanation on how to do this? It'd be much appreciated.



------------------------------
Michelle L
------------------------------
  • Sounds like you just need a simple relationship, with a lookup field. I am presuming one table (lets call it category table) has records that look something like:

    Category A, User Jon Smith
    Category B, User Jane Doe
    Category C, User Julie Baker

    On the other table (main table), you want to select category B, and it show Jane Doe right?
    If so, make a relationship, one Category Table has many Main Tables.

    Proxy field is the Category, then you make a lookup field of the User. Simply display the user field on the Main table.



    ------------------------------
    Mike Tamoush
    ------------------------------
    • MichelleL's avatar
      MichelleL
      Qrew Trainee

      I finally got it to work! Thank you so much. Ridiculously simple once you figure it out. 



      ------------------------------
      Michelle L
      ------------------------------
  • So the Category table has a relationship to the primary table, in that relationship is where you would pull the contact field through. How are you trying to add the contact field in the primary table? 



    ------------------------------
    Josh Hamilton
    ------------------------------
    • MichelleL's avatar
      MichelleL
      Qrew Trainee

      Hi! 

      So I have the table relationship set up (one contact to many primary table records) and set the category field (in the category table) as the key field. That relationship field is showing up in my main table, but I'm at a loss as to how to get the contact field in the main table to pull the contact from the contacts table based on the corresponding category. I've tried and abandoned a whole lot of formulas and attempts to get the info using Pipelines, and am having no luck at all. I swear I've done this successfully in the past and it was simple. I'm definitely missing something obvious, but I've no idea what. 



      ------------------------------
      Michelle L
      ------------------------------
  • I don't think you need to make the category the key field. If the user is manually selecting, then they simply select the category they want. What you are looking for is a lookup field. Once they select the category, any of the information attached to that category can be pulled into the main table via lookup fields.



    ------------------------------
    Mike Tamoush
    ------------------------------