Clear rows in Subform
Note: This task is applicable only to Zoho Creator.
Overview
This task is used to dynamically delete subform rows.
Note: It is currently not possible to delete selected rows in a subform. This task deletes all rows present in a subform.
Syntax
Parameter | Description |
---|---|
<subForm_linkName> | Link name of the subform from which the rows will be deleted |
Note:
- When using a blank form as a subform, this task deletes all the rows in the subform. Data in the deleted rows cannot be retrieved.
- When using an existing form as a subform, this task deletes the subform rows from the parent form, however the records are kept intact in the the child form.
This task can be used in the following events
When a record is Created | ||
On Load | Yes | |
On Validate | No | |
On Success | No | |
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 | No | |
On Success | No | |
On User input | Yes | |
Subform on add row | Yes | |
Subform on delete row | Yes | |
When a record is Edited | ||
On Load | Yes | |
On Validate | No | |
On Success | No | |
On User input | Yes | |
On Update | Yes | |
Subform on add row | Yes | |
Subform on delete row | Yes | |
When a record is Deleted | ||
On Validate | No | |
On Success | No | |
Other workflow events | ||
On a scheduled date | No | |
During approval process | No | |
During payment process | No | |
In a Custom Function | No | |
In an Action item in report | No |
Example
1) Let's say we have a subform field named "Items". We need to be able to delete the subform rows by checking the Decision box field type "Clear rows". The following snippet (written in the On User Input section of the Decision box field ) can be used in this scenario:
2) This task can be used to clear subform rows in fetched records. Let's say we have an Employees form with "Job Experience" subform field and "Date" field.The following snippet can be used to delete the subform rows in records which have the current date value in the Date field:
for each rec in fetchedRecords
{
rec.Job_Experience.clear();
}