Delete Record
Letting users delete records in your data.
This Action Button lets you delete records in your data source. To demonstrate how the Delete Record button works, weโre going to use a List block connected to an Airtable data source, which shows a list of tasks for a hypothetical product development team and has three fields: Name (the name of the task), Assignee (who it is assigned to), and Status (the current progress status of the task). We want to enable a โDelete task statusโ button to allow project managers to delete tasks.
First, we are going to configure the button label and that texts that are going to be shown in the pop-up (or modal) opened by the delete button.
Button Visibility
Now, letโs configure the button visibility to specify who the button is going to be visible to. The users of our task list are the same people who are working on those tasks, so we are going to connect the same Airtable base with tasks and assignees to Softr as a user database.
Now, letโs configure the actual button visibility settings. We need to allow only Project Managers to delete tasks, so, first of all, we need to create a User Group that includes only the users whose Position is Project Manager.
Next, we need to navigate to our delete buttonโs visibility settings and select the user group that is going to be able to view the button.
Thatโs it. The next and last step is to make sure everythingโs working as expected.
Testing task deletion
To test our setup, we are going to log into our application with a user whose position is Project Manager and attempt to delete one of the tasks. The following gif illustrates that.
Last updated on April 18, 2023