Skip to main content

Update Collection - Automated Workflow Event

The collection created in DrapCode can be handled easily by creating collection events. The "Update Collection" event action allows you to update or change data in a collection.

Let's see how to create an event step by step to update data in a collection.


Step 1: Create Update Collection Event Action

To create an event to delete data in a collection, go to the Events panel and click the Add Event button. Then, add the Event Name and click the Create Event button.

Then, click the Add New Action button, bring the cursor to the option, Collection in the dropdown event action list and select the Update Collection by clicking on it once.

The Update Collection dialogue box will open. Here, choose the element you want to update and click the Save button.

DrapCode Builder Update Collection Event

Step 2: Bind the Update Collection Event

Now, drop a collection form in your canvas or if added already, then open the page which contains that collection form. Go to the page settings and bind the collection with the page whose data you want to update.

Also, bind the same collection with the collection form and the update collection event as well.

DrapCode Builder Update Collection Event

Step 3: Bind Each Value of the Collection Form's Input Field

Now, click on each input field, go to its settings and click on the radio button to get input values from the binded collection. Select the same value of the input field from the collection one by one for each input field as shown below:

DrapCode Builder Update Collection Event

Step 4: Bind the Collection with a Data Table

Now, go to the page that contains the data table and bind the same collection with the page and the data table. Under the Actions field, remove the Delete link and open the settings of the Edit link to attach the link of the collection form with it.

In the settings of the link, select the page that contains the collection form and choose the option id in the path field. Also, tick the checkbox if you want the page containing the collection form to open in a new tab.

DrapCode Builder Update Collection Event

Step 5: Preview or Publish the Page to Check the Update Collection Event

Now, click on the preview or publish icon and open the page containing the data table to check whether the created update collection event works or not. Click the Edit link under the Actions field. It will land you on the page containing the collection form. Make the changes and click the submit button.

You can also add the Show Alert Message in the Update Collection event to get the notification about the successful or failed updating attempt.

DrapCode Builder Update Collection Event