Skip to main content
Question

Update the table record using API_DoQuery

  • March 20, 2019
  • 0 replies
  • 29 views

Hi,
I have two table Parent and child table, I importing data into child table and i want to relate that imported data to the parent last record id how can i achieve this functionality.

In SQL : 
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
This topic has been closed for replies.

  • Quickbase Alumni
  • March 20, 2019
When you say last record id - can you elaborate? Are you doing an import of a parent record, then a second import of your children and then need to associate the children against that most recent parent record? 

If yes - my first thought, if you're using doQuery to get the most recent parent, would be to query your parent table to sort your doQuery in descending order of record id (meaning that you are returning the newest record id's first) and then set an option parameter for number of records to be 1 - so you only return the most recent record. You can parse that for the record ID and and associate it before you import the children

Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base