Clear items
Note: This task is applicable only to Zoho Creator.
Overview
The clear items deluge task clears(removes) all choices in a specified single-select, multi-select or lookup field.
This task only hides the choices from appearing, and does not delete them from the database.
Note:
- It is advisable to use the clear task before using the add task, to make sure the choices are cleared before the new choices are added.
Syntax
clear <field_link_name>;
Parameter | Description |
---|---|
<field_link_name> | Link name of the field in which choices will be cleared(removed) . Only the following field types can be specified:
|
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 | |
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
In the following example, "colors" is a form field of drop-down type. "Get_Bright_Colors" is a decision-box field type, which when checked, adds one set of colors to the "colors" field and adds another set if unchecked. Before adding the choices, the clear task makes sure the previous choices have been removed.
if(Get_Bright_Colors)
{
addColors={"white","orange","yellow"}
}
else
{
addColors={"Brown","Black","Grey"};
}
clear colors;
colors:ui.add(addColors);
{
addColors={"white","orange","yellow"}
}
else
{
addColors={"Brown","Black","Grey"};
}
clear colors;
colors:ui.add(addColors);