Issue with additional scope

hello,

i try to trigger an update query from js query after save changes in the new table component:
saveChangesProjects.trigger({
columnName: columnName,
columnValue: columnValue,
uniqueKey: uniqueKey
});

this is the 'saveChangesProjects' query:
UPDATE projects
SET {{columnName}} = {{columnValue}}
WHERE id = {{uniqueKey}}

and this is the error messege that i got:
syntax error at or near "$1"

is anyone know where is the problem in my code?

You cannot use {{columnName}}. You should hard code the column name in the update query.

saveChangesProjects.trigger({
columnValue: columnValue,
uniqueKey: uniqueKey
});
UPDATE projects
SET columnName = {{columnValue}}
WHERE id = {{uniqueKey}}

You could try putting your saveChangesProjects query into GUI mode not SQL mode and use changeset object as the source of the update?

but i need to update dynamic columns, based on the changes that the end-user made in the table. do you have any idea?

like this?

and what is the syntax i should write in 'id' column?

Use bulk update and make sure the primary key is set in the table

This.

You have a {{uniqueKey}} in your object so presumably that's what you'd want to use.