Updating address Field From Other Table

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
  • (Edited)
I have a stores table related to a parent (shopping centres) where we have an address field. When creating a new store, is there a way to copy the contents of parent table to the address field in stores? I understand I can look up the contents but issue is that the adress in the parent table may or may not be the same as we want in the stores table. But being able to copy the address in the child will minimise our typing effiort where address is more or less the same. 
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of dwhawe

dwhawe, Champion

  • 662 Points 500 badge 2x thumb
In my opinion, this is an excellent candidate for the new feature Quick Base Actions.  Similar to alerts, you can set them up to only fire when a record is added, you tell them what table to update, and map the source table fields to the target table fields.

http://www.quickbase.com/quickbase-blog/how-to-boost-your-app-design-using-quickbase-actions-part-1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,346 Points 50k badge 2x thumb
Wait, in this case I suggest regular old form r.ules.

Bring down the address field components as look up fields and have a form rule that says basically when the address is blank then change the address field to the value of the lookup fields.

The reason for this is that actions only fire when the record is save and in most cases they probably want the store address to be the same as the center but in some cases they will know they have to override it or perhaps just add a Suite number.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb
Thanks.  I wrote this request after trying with QB Actions, There seems to be a limitation that you can update a field within from the parent table.  I tried but the  report link option is not there to select. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,346 Points 50k badge 2x thumb
In fact you can edit the Oarent with a Kirk Trachy Trick. You make a report link field based in the Record ID field and create it on the right to the same field. Ie search to set he app, and the fields to find the same fields.

If stores are being added via Grid Edit , then actions would be your best bet. But if they are being added on Forms, then I would suggest using form rules.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb
Thanks Mark.  Tried the form option by looking up 'address' field not its components.  The rule I creeated is not able to find a "compatible" field. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,346 Points 50k badge 2x thumb
No Problem,


While firm rules don't work on Address field Types, you can lookup the individual components of the Address fields. They are listed in the Adress field itself.


Then have a form rule trigger when Centre: Address Street 1 is blank to fill in that field and more Actions in the form rule to also fill in the other components like street2 etc down to postal code.
(Edited)
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb
Thanks.  but for the sake of testing the 'blankness' of the addresss fields in stores, I hope I can use the address field as the condition? 
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb
I tried it with and without firing the rule but does not update new store with the centre address. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,346 Points 50k badge 2x thumb
I suggest changing it to firing all the time, not just on save.  (I made that change just now and it worked)
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,132 Points 3k badge 2x thumb
Thanks. Yes it is working. Appreciae.