Choose where you’d like to start

Clear rows in Subform

Table of Contents

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

input.<subForm_linkName>.clear();
ParameterDescription
<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 LoadYes
On ValidateNo
On SuccessNo
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Created or Edited
On LoadYes
On ValidateNo
On SuccessNo
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Edited
On LoadYes
On ValidateNo
On SuccessNo
On User inputYes
On UpdateYes
Subform on add rowYes
Subform on delete rowYes
When a record is Deleted
On ValidateNo
On SuccessNo
Other workflow events
On a scheduled dateNo
During approval processNo
During payment processNo
In a Custom FunctionNo
In an Action item in reportNo
 

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:

input.Items.clear();
 

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:

​fetchedRecords = Employees [ Date == today ];
for each rec in fetchedRecords 
{
rec.Job_Experience.clear();
}

Get Started Now

Execute