Discussions

Expand all | Collapse all

API Call add and update records in one function

  • 1.  API Call add and update records in one function

    Posted 15 days ago
    Currently I am importing a file into an existing table matching to records based on the KEY field I made ("customerID-Invoice#").
    There are hundreds of records in this file, some do not match the QuickBase KEY field properly So when I manually import it creates a new record.

    I want to start using an API call but I noticed there is "Add_record" or "Edit_record" function.
    So, If I use "Edit_record" for API call and the KEY field ("customerID-Invoice#") does not match what will happen?
    1. Create the new record
    2. Nothing
    3. Error msg and no records get updated

    Or is there a different function for the API call I should use?

    ------------------------------
    Russell Beaubien
    ------------------------------


  • 2.  RE: API Call add and update records in one function

    Posted 15 days ago
    If you're using the standard API, you'll receive an error stating that the record doesn't exist. If you want to pull records in using the API and want to effectively do an Upsert, you'll have to do one of two things. 1) Import your data via CSV using API_ImportFromCSV  call OR 2) Use the new JSON API for Records which supports Upserts.

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------



  • 3.  RE: API Call add and update records in one function

    Posted 14 days ago
    So If I use API-ImportFromCSV when I import it will update existing and create new if it doesn't match then?

    ------------------------------
    Russell Beaubien
    ------------------------------



  • 4.  RE: API Call add and update records in one function

    Posted 14 days ago
    Yes.

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------



  • 5.  RE: API Call add and update records in one function

    Posted 14 days ago
    Awesome!!
    thank you for the Help

    ------------------------------
    Russell Beaubien
    ------------------------------