Forum Discussion

JeremyCohen's avatar
JeremyCohen
Qrew Member
5 years ago

Create a new parent record based on criteria on child record

I am working with a record tie in of a parent table being a total volume while a child record utilizes an amount of the parent.

In certain instances the child record can create more volume in the parent, but with systems it has to be in a new line.

So the long and short...

I need to create a URL button that would get the parent info that is related to what is being used in the child and create a new record in the parent with that criteria.

I started a formula with the API_GetrecordInfo  Which does great in giving me it all.  Now I just need to know how to "Copy" all of that data and then edit the record with the information created in the child record.

I figured I could use javascript to form 3 URL's to accomplish this, just not sure the middle one.

1st "Get info" which would pull all the information in the parent.

2nd "Copy info" which would probably be a generate new record with the information of "Get info"

3rd "Edit info" which I would believe is a simple translation of a few fid's to the represented data.

I hope I did a good job explaining this.  Any help would be very much appreciated!

------------------------------
Jeremy Cohen
------------------------------

7 Replies

  • Please clarify wha type of record you want to add, (Parent or Child) and if you want the button to be on the Oarent or the child.

    also please explain why you can't use the native Add child button which is created by the relationship.  Is it because you want a button to actually create the extra child Record and refresh the screen?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------
    • JeremyCohen's avatar
      JeremyCohen
      Qrew Member
      Hey Mark,

      Thank you for your response.

      I need to add a parent record while in the child form.

      I need it to create a new parent record while in the child based on a situation within the child record.  I took a stab at trying it as an automation but I definitely would prefer it to be a URL button as it is a much easier and efficient user experience.

      Details:  There is a commitment out there which states a budget (Parent Record) but the rules dictate that it can be overspent up to a certain threshold.  As the invoice is processed against the commitment within the child record if it falls within that threshold then a new parent record can be established for the difference.

      ------------------------------
      Jeremy Cohen
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        You can create a record by using the API for API_AddRecord, and I can help you with the syntax for that once I understand your work flow.

        You are sitting on a child record.  So via lookups, a child can know any fields from the Parent and they can be used by the API.  So you click and create a parent record and then what?  Where do you want to land the user and does the child you are sitting on need to get attached to the new parent?

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        markshnier2@gmail.com
        ------------------------------