Choose where you’d like to start

Accessing form fields using "input"

Note: This feature is applicable only to Zoho Creator.

Overview

The fields of a form can be accessed in Deluge during various workflow actions. This is effected through the input keyword which acts as a handle to the fields in a form.

Note:

  • By default, the input represents the handle to a form's fields on which a workflow action is being performed.
  • At any given point of time, input can point to only one subForm row.
  • input can point to a subForm row field. But it does not provide a handle to the exact row on which the action is being performed. row is used in this case.

Syntax

To assign the value of a form field to a variable.

<variable>=input.<field_link_name>;

To set the value of a form field.

input.<field_link_name>=<value>;
ParamDescription
<field_link_name>

Link name of the form field whose value needs to be retrieved or set.

<variable>

The variable which will hold the value of the desired form field.

<value>

The value that should be assigned to the desired form field.

This can be of any data type.

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
On UpdateYes
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 FunctionNo
In an Action item in reportYes

Example

Imagine a field age and a concession field which tracks whether a person is eligible for it. The following snippet sets the concession eligibility field to yes if the age of the passenger is greater than 60 years on a client action (like On User Input). 

 if(input.Age!=null)
 {
   input.concession = "yes"; // the passenger is now made eligible for a concession.
 } 

Using composite fields with the 'input' keyword 

The following are a few points to note when using the 'input' keyword with composite fields.

  • When using it with Name or Address fields, it is mandatory to specify the subfields. When using the country subfield, the value must be one of the applicable countries in the field's properties. Otherwise, the specified value will not be considered, and instead will be set to null.
  • When using it with the Users field, you can specify the User_name and email subfields. Or you can directly specify the Users field without the subfields, in which case the User_name subfield is taken by default. However, the value specified is considered, or is taken to be true, only when the value pertains to an actual user. Please note that when using the User_name subfield, the username of the user has to be specified, and when using the email subfield, the email of the user has to be specified for it to work.
  • When using it with Added User or Modified User system fields, you can specify the display_nameuser_namefirst_namelast_name, and email subfields.
  • The URL field will work when the value is specified in a HTML format like the following:
    <a href= \"<URL>\" title = \"<TITLE>\" target = \"_blank\"><linkname></a> 
    where: title, link name and target are optional params 
    For example
    input.URL = <a href= "https://www.zoho.com" title = "Zoho webpage" target = "_blank">zoho</a>
  • Values of subform fields in the current form can be accessed using the row keyword.

Related Links

Get Started Now

Execute