We need to setup two server actions. One for updating the data and another one for getting the info from the database to populate form fields. First, let's setup the multi update server action (1-2). Add a database connection step (3-5).
We load from "insert" (1-2)
Add a multi update step (1-3).
Setup the update step options (1-3).
Select the table you want to update (1-3).
Add the table (1). Add the columns you want to update. We added all of the columns (2). Make sure to add the ID column in the filters tab. In our case it was automatically added, as we added all of the columns to the update (3-4). Click ok when you are done (5).
Save your server action (1). Create another server action (2). We called it update info as we are going to use it in order to populate the update record form fields (3). Add a database connection step (4-6).
Set it up and add a database query (1-3).
Setup the query options (1). Select the same table you selected in the update record step (2-3).
Add its columns to the query list (1-2). Click ok (3).
Save this server action (1). Open the app connect panel (2).
Add app connect to your page.
Add a new component in the app connect tree (1). Under data, select server connect (2-3).
Select the server action you want to use to populate the form fields (1-3).
Click on your page and add a new component (1-2). Under Bootstrap 3, select form generator (3-4).
Select your multi update server action (1-2). Then, in the populate field, select the server action with the query which we've created to populate the form fields (3).
Select the query, under the server action component and click select (1-2).
We changed the ID field type to "hidden" (1-4).
And we're done! Let's preview the results.
Setup the on success actions; like redirect to another page; clear form fields; show notification; etc. We've already shown this in our previous tutorials, so we won't show this now. That's how easy it is to update multiple records using DMXzone App Connect.