Hi, Appsmith Support team and community,
I am working on the in-house app with MYSQL database, the new inline editing is great and must have feature for our dev requirement. For google sheet or mongo db i see so easy to integration that with batch update/ updateALL but for mysql db, i cannot really find any good documentation how to implement it.
For single row inline edit and update, i get it working with the following,
(* i am using the v1.7.12, the Table2.updatedRow doesn’t seem to be working returning empty fields so i just the updatedRows array to get the data)
UpdateQuery:
UPDATE contact SET
first_name = ‘{{Table2.updatedRows[0].allFields.first_name}}’,
last_name = ‘{{Table2.updatedRows[0].allFields.last_name}}’
WHERE id = {{Table2.updatedRows[0].allFields.id}};
For the custom inline edit with multiple rows, I ran into roadblock, how i can write the JS Query to call the MYSQL update query and dynamically passing the value in update query?
Here is some ideas i have but not sure what’s the best practice and how to implement it correctly, please help!
{{function() {
for(let i = 0; i <= Table2.updatedRows.length; i++) {
//Run the update query and passing the id inside the mysql query?
}
}}}