Note: This task is applicable only to Zoho Creator.
The delete record deluge task deletes a form's records which meet a given criteria.
The criteria is mandatory.
delete from <form_link_name> [<criteria>];
| Parameter | Description |
|---|---|
| <form_link_name> |
Link name of the form from which the records will be deleted. |
|
<criteria> |
Criteria based on which the records will be deleted. |
| When a record is Created | |
| On Load | Yes |
| On Validate | Yes |
| On Success | Yes |
| On User input | Yes |
| Subform on add row | Yes |
| Subform on delete row | Yes |
| When a record is Created or Edited | |
| On Load | Yes |
| On Validate | Yes |
| On Success | Yes |
| On User input | Yes |
| Subform on add row | Yes |
| Subform on delete row | Yes |
| When a record is Edited | |
| On Load | Yes |
| On Validate | Yes |
| On Success | Yes |
| On User input | Yes |
| Subform on add row | Yes |
| Subform on delete row | Yes |
| When a record is Deleted | |
| On Validate | Yes |
| On Success | Yes |
| Other workflow events | |
| On a scheduled date | Yes |
| During approval process | Yes |
| During payment process | Yes |
| In a Custom Function | Yes |
| In an Action item in report | Yes |
The following script deletes all records with "Status" field value as "Resigned".
delete from Employees[Status == "Resigned"];
The following script deletes all records of members who are above 65 years of age.
delete from Employee[DOB <= zoho.currentDate.subYear(65)]; //subYear is a which subtracts given number of years, which in this case is 65. //zoho.currentDate is a which holds current(today) date value.
The following script deletes all records which have null value for "Name" field.
delete from Employee[Name == null];
The following script deletes all suform records linked to the current parent form record.
subforms_ids = parentForm_linkname[ID == input.ID].subForm_fieldname; for each sub in subforms_ids { delete from subForm_linkname[ID == sub]; }