Database update using a table

Is it possible to update data in a table view in Wappler?

Sorry, i think you need to add a few specific to that question
If if the table is linked to a server connection then refreshing the data will refresh the table

You could pass a Cookie by adding an on click Event to the Row using the record id (or whatever suits you) and use this for your Update Action filter.

do you mean native mysql table views?

if yes: it is possible :arrow_forward: http://www.mysqltutorial.org/create-sql-updatable-views.aspx

1 Like

Then totally disregard my above answer if this is the case! :smiley:

We’ve done this in a couple different ways. If you can explain the exact use case, can explain better.

I have a view which simply joins two tables, a client table and an event table. The view has the event table which is joined to the client_id of the client table so that the client_display_name is added as a column. I would like to display the records as a table and then allow updates on a field like a spreadsheet. Not sure how to do that in Wappler. MSAccess does it pretty easily so there must be a way.

Thanks,
Rick

how do you do that in wappler?

Native mysql views you „need“ phpmyadmin or similar db tool

So you want to have an HTML Table, which lists the records, not as text but as a form inputs, where you can update them, is that right?
This can be done, but requires some tweaking in the code, which requires some more advanced knowledge. The best way to do this would be to just create a table and add an Edit button, which loads the record in a modal, with an update record form.

Your comparison to Access is really not relevant … MS Access is a desktop software designed to do exactly that, while with Wappler you build web pages …

2 Likes

I usually include an edit button, as Teodor suggested, but also frequently include form inputs with tables too - particuarly if I have checkbox options where a number of records might need editing, eg:

image

It would be time-consuming to open a modal and click the necessary fields and buttons. I set up the checkboxes to submit the forms and the boolean values are toggled on/off - so it’s just a matter of a click.

Give this a vote please
Would love to see this as a Waller component

2 Likes

thanks. the edit button and modal idea worked though slow if there are a lot of records. I’m getting away from MS Access to a web based solution and Wappler is the best I’ve found for web-based database solutions.

Rick

At the moment the only direct solution I can think of it to embed forms into the cells and set them to auto submit so no button is needed or add a hidden button which shows onchange() of the content. Each cell would probably also need a hidden record id field then appropriate server action(s)

"So you want to have an HTML Table, which lists the records, not as text but as a form inputs, where you can update them, is that right?
This can be done, but requires some tweaking in the code, which requires some more advanced knowledge. "

Hi Teodor, referring to above, it is possible for you to prepare some guided tutorial ?

1 Like