Set Variable
Table of Contents
Overview
The set variable deluge task can be used to create a local variable containing a given value.
See this page to learn how to assign values to fields in Zoho Creator using this task.
Return
This task returns the stored value.
Syntax
<variable> = <expression>;
Parameter | Description |
---|---|
<variable> | Variable which will hold the given value. |
<expression> | Value to be assigned to the variable. |
Things to keep in mind
- Assigning a new value to a variable declared earlier will overwrite the existing value.
- Variables need not be declared initially before assigning values to them.
In Zoho Creator, this task can be used in the following events
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 |
Example
The following script assigns the value 0 to variable - temp:
temp = 0;