Quick Base Discussions

Expand all | Collapse all

Is it possible to create records in multiple tables with a single webhook?

  • 1.  Is it possible to create records in multiple tables with a single webhook?

    Posted 02-27-2017 21:15
    I am trying to create records in multiple tables using 1 Webhook.

    Example:

    I have the following tables: Leads, People, Address', Jobs, Cars

    A Lead record has the following fields:
    - Name
    - DOB
    - Address
    - Phone Number
    - Occupation
    - Education Level
    - Car Year
    - Car Make
    - Car Model

    A Person would get the fields Name, DOB
    An Address would get the Address, Phone Number
    A Job would get the Occupation, Education Level
    A Car would get the Car Year, Car Make, Car Model

    Is it possible for a single Webhook to create a Person, Address, Job, and Car record whenever a Lead record is created?


  • 2.  RE: Is it possible to create records in multiple tables with a single webhook?

    Top
    Contributor
    Posted 02-27-2017 21:54
    I don't have a lot of experience with Web-hooks, so somebody else might know how to make that happen, but I know you could do this with a Formula-URL field, combined with the API_AddRecord function.  
    This would require somebody to push a button.  But I'm sure once the lead is qualified or converted to a client is when this happens anyway.  

    So the button could do it all if needed.  (Won client, new Person, New address, New Job, New Car)


  • 3.  RE: Is it possible to create records in multiple tables with a single webhook?

    Posted 02-27-2017 21:54
    Three tables will take 3 Webhooks, not 1.


  • 4.  RE: Is it possible to create records in multiple tables with a single webhook?

    Top
    Contributor
    Posted 02-28-2017 19:28

    You question is just a variant of this question and demo which created three records in different tables with one form:

    Creating 2 records (in two different apps) using only 1 form
    https://community.quickbase.com/quickbase/topics/creating-2-records-in-two-different-apps-using-only...

    Triplicate Forms
    https://haversineconsulting.quickbase.com/db/bmb84cqj4?a=nwr

    The Triplicate Forms demo created identical copies of the record in two other tables (three total). The script used the FormData API with the Fetch API (the replacement for XHR). All you have to do is modify which of the original form fields needs to be included in the FormData sent to each of the tables when posting the FormData.

    See this documentation:

    MDN FormData API
    https://developer.mozilla.org/en-US/docs/Web/API/FormData

    If you need individual assistance implementing this solution feel free to contact me off-world using the information in my profile:

    https://getsatisfaction.com/people/dandiebolt/