Issue updating rows in a dataset via perl api

LabKey Support Forum (Inactive)
Issue updating rows in a dataset via perl api Jon (LabKey DevOps)  2017-11-10 12:27
Status: Closed
 
Hi Wayne,

Unfortunately, the executeSql function within the LabKey Javascript API is limited to doing LabKey SQL, which means you're only allowed to do SELECT statements. INSERT, UPDATE, and DELETE SQL commands are not allowed and you would have no other option, but to use the insertRows(), updateRows(), and deleteRows() options.

The batch process I'm referring to is using the saveRows() function instead where you can bundle update, insert, and delete requests to multiple tables in a single request.

https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.Query.html#.saveRows

However, regardless of whichever option you use, you would have to find a way to collect all of those Primary Keys and then apply the appropriate function to update or delete them if you are choosing to write a script to handle it in lieu of an ETL.

Regards,

Jon