Look up a drop down values from parent

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a parent stores table and and projects child table.  In cases, where we have a project established with a view to close the project, we would like to nominate another closest store that can catch customers.  So in my projects record, I would like to have a drop down to allow user to select a store from store table.   I do have a relationship established. I created a new text field 'adjoining store' but stuck on getting the drop down to work.  Will appreciate some help. 
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

Hi,

Can you create a new selection list field, Stores_2, or something like that. Then, in the properties for the new Stores_2 selection list, under Text Field Options, select, Input Type =  "From Another Field". Click the button that says, "Select Shared Field". Navigate to the Stores field in the Stores table.

You have not only the relationship of Stores >>> has many >>> Projects, but also a second list of Stores in the Projects record coming from the source Stores table in the new drop down selection list. The [Stores_2] list will behave independently and does not mimic the parent Store selection.

Does this adequately address your question?


(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,742 Points 50k badge 2x thumb
If you will be wanting to pull information down from the satires table such as the address or f other fields, you will need to relate the stores table to itself. Then lookup the fields you need.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Thanks Chris and Mark.  So I am basically creating a new table with one field (store name and this is what want to appear as drop down to select or may be a multi select) and relating it to stores one to many. Then do I need to relate projects to this stores 2 table and have the look up field?  
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,742 Points 50k badge 2x thumb
Arshad, no, this is relating a table to itself.  So there is no new table to be created.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Thanks.  I receive a warning when relating a table to itself.  Rather concerned not to stuff up things.  may be next time we talk, you could help establish this. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,742 Points 50k badge 2x thumb
It's just a warning because it is not a usual thing to do. But it won't hurt anything to accept the warning and continue.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,742 Points 50k badge 2x thumb
Arshad. Sorry I misunderstood your question. You do not need a relationship with stores to itself. If you created that you can delete it.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Tried it as suggested.  Am I looking up the field from Projects to Store relationship? My required field is in projects. 
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
I did manage to use Chris's solution and it works great.  Do I still need a relationship I created? 
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
No, that solution does not require a relationship. :)
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
No prob. The only question that remains is how to get the resulting list show names of stores that are currently trading.  At the moment it shows everything.  Also, if we could somehow use a composite field with banner and name that will be even more useful 
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
The composite field should contain the names of those stores that are trading. This composite field may need to be a formula field programmed to have the Store's name appear if it's trading, blank if otherwise. Then, the Store list you created from my original suggestion would instead select that composite formula field column rather than the Store Name column.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Thanks. In creating a formula similar to the following, I get an error, Choices too long - 4385 choices specified. Field may not have more than 50 choices.

If([Date Opened] > Today() and [Banner] = "WWWW", [Store Name])
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
IN this case I would not use the Multi-select Text field, but rather the multiple choice field.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,142 Points 3k badge 2x thumb
Thanks. That would allow us to select only one store which is not what we want.