Click a table cell to edit, and push edits back to mysql?

Hi,
I’m testing out Drona here. I have a mysql database connected, and am displaying the data in a table in Drona.

I want a user to be able to click on a cell, make an edit, and then push that data back to the database.

Can anyone point me to documentation regarding how to allow the user to make edits to data and push it back to the database?

@mbrodeur

I am moving this Topic to Ask Community Category for better visibility.

For Displaying Data -
Use BIND Data option on Tablegrid Control and using connector option, select your Select query for fetching data.

For Updating you can follow below series of steps-

  1. Update Tablegrid property to Navigate with selection and provide update screen.

  2. Create Update Screen which you can provide in step 1 and populate its controls with Selected Row value of tablegrid using - DATA > Controls > Tablegrid > Column Name as shown below

  3. Add a Button control in Update Screen and in it button_click event you can design an Action flow that will perform series of steps -
    i. Add Server Side action for your connector and select Update Query that you have created for updating data
    ii. Refresh Table grid control using On-Screen Action > Set Controls Value action
    iii. Navigate to First screen using On-Screen Action > Navigate option

Hope this Helps!

Thanks, do you have documentation on writing UPDATE queries? Mine are not saving. When I am in the “Conenctor” area, I test the query, and click save, and the page just spins and won’t complete the saving.

And also, how do you set variables to use in the query? I see that I can put variables in {{curly brackets}} but how do those variables get set? What do they reference?

I’m getting there! I found the variable setter in the database connector part of the actions. It’s quite confusing that it has the same name as “Variables” even though they are different things.

@mbrodeur

Yes at first instance Variables in query and Variables in app may create some confusion. We are planning to make this simpler to avoid this confusion. However, just to clarify, Variables is Queries are enabling you to Bind Dynamic fields from you MicroApp where as Variables in App are of 2 types - Persistent and Non-persistent that can act as a On-memory storage for reference and usage. Given this differences, Variable in query is only specific to Connectors and Variables referred in App Builder is always the latter.

Please find below a quick reference as to how I have implemented update product name for my app. Here’s the query I have configured.

Here’s how I have add the above query in my Button click event’s Action flow. Here my dynamic Variables appears as an Input field - ProductName and ProductID for my update query connector. I have assigned “productname” and “productid” which are unique names of Text input control in my. app using Use Keywords option.

Here’s how preview look’s like -

DB Table Screenshot showing it updated the change

Hope this Helps!
Do let me know if you are still facing an issue or you are able to resolve?

1 Like