Forum Discussion

ArshadKhwaja's avatar
ArshadKhwaja
Qrew Commander
9 years ago

Look up a drop down values from parent

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. 
  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain

    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?


  • 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.
  • 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?  
  • Arshad, no, this is relating a table to itself.  So there is no new table to be created.
  • 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. 
  • 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.
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Arshad. Sorry I misunderstood your question. You do not need a relationship with stores to itself. If you created that you can delete it.
  • Tried it as suggested.  Am I looking up the field from Projects to Store relationship? My required field is in projects. 
  • I did manage to use Chris's solution and it works great.  Do I still need a relationship I created? 
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain
      No, that solution does not require a relationship. :)
  • 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 
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain
      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.
    • ArshadKhwaja's avatar
      ArshadKhwaja
      Qrew Commander
      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])
    • ChrisChris's avatar
      ChrisChris
      Qrew Assistant Captain
      IN this case I would not use the Multi-select Text field, but rather the multiple choice field.