Deleting records
In FL0, the Delete component deletes one or more records from a database.
This tutorial uses a to-do list management application as an example to demonstrate how to delete records from a database.
Prerequisites
- You have a FL0 account.
- You've read Updating records.
Step 1: Create a flow
- Create an HTTP Request flow.
- In the Explorer pane, click Create new.
- Select Flow.
- Type Delete Task.
- Tap the Return key.
- When a dialog appears, select HTTP Request.
- Open the Start component.
- From the Method dropdown, select DELETE.
- In the URL field, enter /task.
- Create a query parameter for specifying the ID of a task.
- Under Query String, click the + icon.
- In the Name field, enter id.
- Enable the Required option.
- Click the X icon to close the component.
- Click Save.


Step 2: Add a "Delete" component to the flow
- Drag a Delete component into the flow.
- Select the component to open it.
- From the Table dropdown, select Tasks.
- In the Row IDs field, select Start > QueryString: id.
- Click the X icon to close the component.
- Click Save.


Step 3: Add an "End" component to the flow
- Drag an End component into the Delete Task flow.
- Select the component to open it.
- From the Status Code dropdown, select 200 OK.
- From the Content Type dropdown, select application/json.
- In the Body field, select Delete > Data.
- Click the X icon to close the component.
- Click Save.


Step 4: Run the flow
- Open the Run panel.
- In the id field, enter the ID of a task.
- Click Run.


If you navigate to the database table, the specified record is deleted.
Updated 8 months ago