Quick Base Discussions

Expand all | Collapse all

Autopopulate, then edit a lookup field ??

  • 1.  Autopopulate, then edit a lookup field ??

    Posted 07-20-2017 03:18
    I have a shipping address section on an order entry form that auto-populates from a contacts table (via lookup fields).

    It brings the information in perfectly, but I would like to have it bring it in so that is gives the value of the lookup, but then have the field remain editable for any changes (changes would not be saved back to the contacts table, but just a temporary change for the current order).

    Just learning quick base, so not sure if I'm just missing a checkbox somewhere that would allow for this. 

    Thanks
    Mark


  • 2.  RE: Autopopulate, then edit a lookup field ??

    Posted 07-20-2017 04:25
    What I do in these cases is create override fields.  Lookup fields cannot be edited in the child as you have discovered.

    It takes three fields each for the pertinent fields.  I'll use City as an example.

    There is the City field you already have that is a lookup form the relationship.

    Then you would add a City_Override field and a City_UseThisOne field.  My choice of names for the example.  You can call them whatever you want.

    City_Override would be a Text field available to type in.

    City_UseThisOne would be a Formula - Text field. 

    City_UseThisOne formula:

    If([City_Override]="",[City],[City_Override])

    --There are probably better ways, this is how I would do it.


  • 3.  RE: Autopopulate, then edit a lookup field ??

    Top
    Contributor
    Posted 07-20-2017 04:46
    What you will want to do is make an "Override" field.

    Do do this you will need to make 2 new fields on the "Order" table.

    (1) Order Address (formula-text field)
    (2) Change Address (Address field)

    The formula logic for the "Order Address" will be:

    If([Change Address]<>"", [Change Address], [Lookup Address])

    Basically if you decide not to override the lookup address by leaving it blank, it will use the default, otherwise it will use the changed address.

    You can break this out to all the individual components on an address field.  which is useful in situations where you only need to change one line of the address, like an apt #.


  • 4.  RE: Autopopulate, then edit a lookup field ??

    Posted 07-20-2017 11:21
    Thanks for the suggestions, This will work for my needs.
    I appreciate the help!

    Mark


  • 5.  RE: Autopopulate, then edit a lookup field ??

    Posted 07-20-2017 12:21
    I wasn't real happy with having the extra set of override fields on the form, so what I ended up doing was using the Dynamic Form Rules to achieve this with a single set of fields on the form.

    When a known contact is selected (ie.. not blank), then change address fields to lookup values (which are hidden).

    With this rule, even after a contact is selected, the fields remain editable.

    Mark


  • 6.  RE: Autopopulate, then edit a lookup field ??

    Top
    Contributor
    Posted 07-20-2017 16:06
    I usually keep the override fields and look up field hidden. And just show them when they check a box saying "change address?"

    Either way, I'm glad you found a solution.