Choose where you’d like to start

Accessing subform fields in client actions using "row"

Note: This feature is applicable only to Zoho Creator.

Overview

The fields of a subForm row can be accessed in Deluge during client actions. This is effected through the row keyword which acts as a handle to the fields in a subForm row.

Note:

  • By default, the row represents the handle to a subForm row's fields on which a client action is being performed.
  • At any given point of time, row can point to only one subForm row.
  • row is similar to input, except that its scope is restricted to the client actions on a subForm row. Composite fields in a subform row are accessed 

Syntax

To fetch the value of a subForm row's field.

<variable>=row.<subForm_field_link_name>;

To set the value of a subForm row's field.

row.<subForm_field_link_name>=<value>;
ParamDescription
<subForm_field_link_name>

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

<variable>

The variable which will hold the value of the desired field from a subform row.

<value>

The value that should be assigned to the desired field in a subform row.

This can be of any data type.

This task can be used in the following events

When a record is Created
On LoadYes
On ValidateNo
On SuccessNo
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Created or Edited
On LoadYes
On ValidateNo
On SuccessNo
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Edited
On LoadYes
On ValidateNo
On SuccessNo
On User inputYes
On UpdateYes
Subform on add rowYes
Subform on delete rowYes
When a record is Deleted
On ValidateNo
On SuccessNo
Other workflow events
On a scheduled dateNo
During approval processNo
During payment processNo
In a Custom FunctionNo
In an Action item in reportNo

Example

Imagine a subform with an email field. The following snippet retrieves the email address in a subForm record on a client action (like On Load) and assigns it to another variable.

 if(row.mail!=null)
 {
   emailId = row.mail; // the email from the field in the subForm row is now retrieved
 } 

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(row.Age!=null)
 {
   row.concession = "yes"; // the passenger is now made eligible for a concession
 } 

Accessing composite fields in a subform using "row"

  • When using with the 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 is not considered.
  • When using 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.
  • 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
    row.URL = <a href= "https://www.zoho.com" title = "Zoho webpage" target = "_blank">zoho</a>

Related Links

Get Started Now

Execute