Forum Discussion

KellyLyons1's avatar
KellyLyons1
Qrew Trainee
2 years ago

Button to copy/autofill child record

I am trying to figure out how I can copy certain info from a parent table into a child, I have read through many threads but am still stuck.  I have a parent table "Accounts"  and I want to be able to copy/autofill certain field in my "Estimate" table.  For example when I am creating a new estimate for an existing account, I want to autofill/copy the new estimate with the fields from the parent table.  I looked into and tried the copy master and detail option, but am still confused.  

Could I use a webhook or action to set up a button on the child table/forms to accomplish this?  The new record being created will always have the same info I need to autofill.  Any help would be great!




------------------------------
Kelly Lyons
------------------------------

5 Replies

  • I can answer, but are you aware that you can simply do a lookup field from the parent down to the child?  Or do you need the fields to be editable on the child.

    Also are you adding children manually with an Add Record button?  Or do you also need Grid Edit or other methods to create children.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • KellyLyons1's avatar
      KellyLyons1
      Qrew Trainee
      Hii Mark, 

      Yes I am aware and have a button on the parent table to "Add" a child record, but it only populates the name on the account.  When I add the record from the actual account in the parent it does auto populate the account name, but I also I am trying to get specific fields to auto populate.  Otherwise I still have to fill in the same data over and over.  

      I add the child record more often from the child table itself, and sometimes use grid edit if I have multiple records to add I use grid edit as well.  
      Either way I want the details from certain field to fill in once I have selected the account.  I would like the fields to be editable in case I need to make a change.

      Maybe I am just not setting things up correctly?

      ------------------------------
      Kelly Lyons
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        If you are creating a Child by a button on the Parent record you can populate any field like this

        URLRoot() & "db/" & [_DBID_TIME_RECORDS] & "?a=API_GenAddRecordForm"

        & "&_fid_11=" & URLEncode ([Record ID#])
        & "&_fid_21=" & [Related Client]
        & "&z=" & Rurl()

         you just specify the field to be populated and what goes in it.  if the field is a text field its safest to wrap it in URLEncode.  The internet does not like certain characters in the code.

        But if you're adding children via grid edit then you are going to have to build a pipeline to populate those fields when the record is created.



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------