Delete a database record

Delete a record in a database when a specific element is clicked.

Build workflow

Note: For this workflow, you need to have a database with data inside and an element connected to your database. We'll use a project where everything is already set up. You can clone this project and use it to build while following the steps below.

On the canvas, you'll see a list of fruits. Each fruit is a database entry. The goal for this section is to remove one of the fruits from the database entry using the workflow feature.

The first thing to do is to add a delete button to the dynamic element list (like a close button on top of each image).

Once you've added this button, select it and open the Settings tab on the right-hand side. Under Attributes, add the ID name for the element. We'll type "remove-fruit".

Now head to the Workflow tab by clicking on the third icon from the top all the way at the left-hand side. Then click on + Create workflow to start your workflow and then on Click here to add on an event. Choose Elements, followed by Clicked.

Then in the dropdown menu, select the element we just named (remove-fruit).

Select Click here to add an event, go to Data, and then by Delete database record.

Finally, give your workflow a name and click on the blue button to create your workflow. Head back to the editor to test and preview the workflow actions.

Ready to dive into dynamic content?
Read more

Get your no-code fix

Join our monthly email with no-code insights and Ycode updates.
.
2019 - 2021 © Ycode. All rights reserved.
Terms & Policies