Skip to main content
Participating Frequently
Jun 13, 2023 1:04 AM UTC
Solved

Is it possible to perform multiple inserts or updates in the Query Database?

Is it possible to perform multiple inserts or updates in the Query Database?

I understand that the method using recordTyoe and relation is recommended by Appian, but I am asking this question to achieve exclusive control of updates to multiple tables.

I know that this can be accomplished by a procedure, but I would like to know if QueryDatabase can be used as another technique.

harshitb6843
Brainy
Jun 13, 2023 6:06 AM UTC

You can. But just like you mentioned, you shouldn't. But yes, technically, you can!

7 replies

tomoo7550Author
Participating Frequently
Jun 13, 2023 3:33 AM UTC

"Multiple" means inserting a RecordType with multiple records.

harshitb6843
Brainy
Jun 13, 2023 6:06 AM UTC

You can. But just like you mentioned, you shouldn't. But yes, technically, you can!

stefanhelzle0001
Brainy
Jun 13, 2023 6:24 AM UTC

What exactly do you mean with "achieve exclusive control of updates to multiple tables"? Appian records allow you to only update specific fields.

tomoo7550Author
Participating Frequently
Jun 13, 2023 7:26 AM UTC

This is an image of updating multiple tables.
When updating a parent table and its associated child tables, I am considering a use case where record locking must be performed to prevent other transactions from accessing the parent table until this series of insert operations is completed.

stewart.burchell
Employee
Jun 13, 2023 7:37 AM UTC

Locking is a different matter. I would strongly recommend you look at this:

community.appian.com/.../pessimistic-locking