The delete records Deluge task is used in Form action and Field action scripts to delete existing records from a form, based on the specified criteria. The Form definition of the script will be displayed in the Form Definition -> With Action block of the Script Builder, in the format given below. Here, the script is added to the Form Actions - On Add - On Success block of the form.
delete from FormName[ Criteria ];
<formname> - name of the form to delete records <criteria> - The criteria expression/value based on which the records will be deleted.
To add the delete record task in Script Builder,
Refer the topic Using Script Builder for detailed steps to invoke the script builder and add the script.
The sample code given below deletes all records in the Sample Form whose Email is same as the Email id added to the Contact form. The script is added to the on add -> on success block of the Contact form and will be executed when a new record is added to the Contact form.
delete from Sample[ Email_id == input.Email_id ];