Discussions

 View Only
  • 1.  How To Add Multiple Records To A Single Table Via A Single Webhook

    Posted 04-04-2017 17:33
    I've constructed a few webhooks, which are great, but I soon realized that I'm limited to 10 Webhooks per table.

    To overcome this limit, there seems to be two approaches so i'm going to ask two questions:

    1. Can i construct a webhook to post multiple records to a single table and if so, am i limited in the number of records it can create?  If this is possible please show me an example of how the body should be constructed to add multiple records.

    Here is my current webhook which creates only a single new record
    <qdbapi> <usertoken>%MYUSERTOKEN%</usertoken>
     <field fid="7">[Record ID#]</field>
     <field fid="18">Optiplex 7040(2 slot)</field>
    </qdbapi>

    2. Can I construct a webhook to Post via ImportCSV and if so, (within the body) where do i point to the CSV file and or can i point to an existing table in my application?  The body examples that I've seen in this forum don't seem to indicate where the CSV is coming from. If this is possible please show me an example of how the body is constructed to highlight how to point to the CSV or table.


  • 2.  RE: How To Add Multiple Records To A Single Table Via A Single Webhook

    Posted 04-04-2017 18:13
    Use script instead of webhooks to overcome the 10 web hook per table limitation.

    In my opinion QuickBase has made a mistake forcing you to embed tokens and values within the XML body of a webhook directed at the QuickBase endpoint. All of QuickBase's APIs can be called without an XML body using either a GET or POST by packing the parameters into a query string format instead of an XML body. Using an XML body just makes the webhook definition difficult to read and error prone.

    Used in this context the webhook interface should just solicit the parameters involved:

    act: xxxxxx
    records_csv: xxxxxx
    clist: xxxxxx

    and allow the backend to format the request from the entered information.

    This same abstraction of just dealing with the parameters allows you to call API methods with jQuery (or some other library) without involving any XML:

    $.post(dbidTable, {
      act: "API_ImportFromCSV",
      records_csv: csv_data,
      clist: "6.7.8.9.10.11.12.13.14"
    });

    There are simply four parameters {dbid, act, records_csv, clist} to specify in the above call to API_ImportFromCSV. and a lot less line noise.



    ASK: Please Give Me Your Formulas
    https://community.quickbase.com/quickbase/topics/formula-parser-in-javascript#reply_18555784


  • 3.  RE: How To Add Multiple Records To A Single Table Via A Single Webhook

    Posted 04-06-2017 20:38
    This is probably a stupid question but.. where would i put the script?  In a formula URL field?