Skip to main content
Question

API_ImportFromCSV

  • May 13, 2020
  • 0 replies
  • 61 views

Can we update and add record using single API_ImportFromCSV api call?

My requirement is want move record data from table to table by homepage button click.
If record is already exist in 2nd table we have to update those record if not have add those record.

Can i do in single API call?

------------------------------
Chethana Shetty
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+17
  • Community Moderator
  • May 13, 2020
Hi Chethana,

It is possible when doing an ImportfromCSV for new records and existing records to be updated. The trick of that is the key between the two tables needs to be consistent , there needs to be a unique identifier that they share in order for the API to have the necessary logic to combine records or create a new record. In the ImportfromCSV call you would want to take advantage of the mergeFieldId parameter, you can find more in the help doc for API_ImportfromCSV in our API Guide

mergeFieldId

With this parameter, the import uses the field specified as the key, instead of the key field for the table.

  • The merge field must be a unique field, and the specified merge field must contain unique values.

  • Values for the table key and/or record ID field will be ignored from input to prevent data corruption.

  • If the specified merge field uses a formula, and a record cannot be found by its value, a new record will be added if the resulting formula value is a valid value for the field.

  • Record ID or other table key field can be used as the specified merge field.

  • The clist parameter is required if this parameter is used.

To specify the field, use the field ID, for example:

<mergeFieldId>10</mergeFieldId>

For more details, read an article about the parameter on the Quick Base Community site.


I hope this suggestion is helpful Chethana.

------------------------------
Evan Martinez
Community Marketing Manager
Quick Base
------------------------------