Autopopulate, then edit a lookup field ??

  • 2
  • 2
  • Question
  • Updated 2 years ago
  • Answered
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
Photo of Printmark

Printmark

  • 436 Points 250 badge 2x thumb

Posted 2 years ago

  • 2
  • 2
Photo of dwhawe

dwhawe, Champion

  • 804 Points 500 badge 2x thumb
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.
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
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 #.
Photo of Printmark

Printmark

  • 436 Points 250 badge 2x thumb
Thanks for the suggestions, This will work for my needs.
I appreciate the help!

Mark
Photo of Printmark

Printmark

  • 436 Points 250 badge 2x thumb
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
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
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.