Is there a way to automatically generate a connected record in a parent table when a child record is added?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered

Our app has an item table and an assembly table.  An assembly is constructed of 1 or many items.  I would like to set up the app to automatically create a new assembly with a link to the item whenever an item is added.  Is this possible to do within a form?

Photo of Ben

Ben

  • 30 Points

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Can you clarify the "ask".  One Assembly has many Items.  I'm actually thinking that an item would get used on more than 1 Assembly, so in fact your setup is (or should be) One Assembly has many Assembly Items, and One Item has many Assembly Items.

So, then you are saying that you add a new Item to the Item Master table.

What is it that you want to happen?
Photo of Ben

Ben

  • 30 Points
Ideally when a record is created in the item table, I would like to automatically generate a new record in the assembly table as well with a connection to that new item.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
If you want to push a button on an item to create an Assembly we can work though that on this forum.  If you want it to be truly automatic, then that can be done with Webhooks, but  for me to help you set that up would that would require one on one consulting to get that done.  My profile has my contact information.
Photo of Ben

Ben

  • 30 Points
pushing a button would be fine
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
OK, so now when you say that you want to create an Assembly record, do you just mean to put up an Add Record form with some fields already filled in, or do you actually meant to fully create  and save an Assembly record. Either way I need to know which fields you want filled in, the field ID# of each field to be filled in,  and what their values should be populated with.

Also after the record is saved, where do you want to leave the user.  On the Assembly record?  back on the item?  or somewhere else.
Photo of Ben

Ben

  • 30 Points
I realized I need 3 tables, but I want to generate a new assembly that has the "related item" field filled in with the new item's record ID.  If it's possible it would be great if the user could be brought to the assembly record too, but it's not necessary.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
... was that an answer to my question?
Photo of Ben

Ben

  • 30 Points
Sorry, the field ID # for the related item is 13 on the new assembly record, which should be filled with the record ID# of the item.   No other field needs to be filled in via this process
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Can you answer the rest of my questions too?
Photo of Ben

Ben

  • 30 Points
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
OK, thx for letting me know.