Set Field Value
Table of Contents
Note: This help page is applicable only to Zoho Creator
Overview
The set variable deluge task can be used to assign values to form fields.
See this page to learn how to declare variables using this task.
Return Type
This task returns the stored value.
Syntax
input.<field_link_name> = <expression>;
Parameter | Description |
---|---|
<field_link_name> | Link name of the field to which the given value will be assigned.
|
<expression> | Value to be assigned to the field. See this table for the list of field types this task can be applied to. |
Things to keep in mind
- If a value is initially entered for a form in the UI, and a different value has been assigned to that field using this task in the On Validate or On Success event, the value assigned in the script will overwrite the value given in the UI when the form is submitted.
- If this task is used to assign a value to a field in the On Load event, the maximum characters property for that field is ignored. However, if you start editing the field, the maximum characters property will take effect.
- If "No Duplicate Values" is selected, and a duplicate value is specified in the "Add Record" task, the script execution will fail.
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 current date value to the field "Date".
input.Date = zoho.currentdate;