I have a list of objects that are stored in the database, each in its own row. I am able to retrieve it, but I don’t know how to update all these rows (I attached a screenshot as an example).
Hello @icaro yes… but how do I filter so all objects will go to the right row? I don’t know how to that part. I tried to do it for some hours now with co-pilot and couldn’t find the answer and have now even exceeded the daily limit.
Could you please direct me what I need to do to separate each ID for each row in the database?
Yes, I need to update each ID with its own row in the database. So for example
(3) [Object, Object, Object]
0: Object
a. id: “1”
b. title: “Title 2”
1: Object
a. id: “2”
b. title: “Title 1”
2: Object
a. id: “3”
b. title: “Test”
And each object got its own row in the database and I want to update all these objects by looking up their ID and update all the titles (for example).
Have you tried writing a custom SQL query to get this done? You can select the query type Custom SQL query for write and write the query to update multiple rows.
I haven’t tried the custom SQL query earlier… but am testing it out right now after your suggestion.
I am not sure what I am doing wrong, but no matter what I do I got an Invalid SQL string error… even with a simple SELECT * FROM public.test; I got that error.
But now I am not sure if this is a general problem going on right now at Plasmic or I am doing something wrong.
Even a simple SELECT * FROM your_table gives me an Invalid SQL string error. Tried it with Custom SQL query to fetch rows and Customm SQL query for write operations but both give me the same error.
I tend to think that the Custom SQL query function has a bug. Can you maybe test and confirm if the SELECT * FROM your_table function works on your side? If it does work on your side, then at least I can leave that option out.
Thank you @icaro, I can confirm that SELECT * FROM your_table does work in the static expression editor.
The rest unfortunately not yet, still getting the Invalid SQL string / Missing required field: Query error. I will dig deeper to try to get it to work.