Choose where you’d like to start

Set Field Value

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>;
ParameterDescription
<field_link_name>

Link name of the field to which the given value will be assigned.

  • Mandatory fields should not be assigned null value. If a null value is specified, execution will be stopped during run time.
  • Signature and Formula fields cannot be specified
  • The Add Notes field type can be specified only in the "On user input" and the "On load" workflow sections.
  • Values for Auto Number field type, Formula field type, and system fields should not be specified. Zoho Creator will set values for them automatically.
<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 LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Created or Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Deleted
On ValidateYes
On SuccessYes
Other workflow events
On a scheduled dateYes
During approval processYes
During payment processYes
In a Custom FunctionYes
In an Action item in reportYes

Example

The following script assigns the current date value to the field "Date".

input.Date = zoho.currentdate;

Get Started Now

Execute