"old" keyword
Table of Contents
Note: This keyword is applicable only for Zoho Creator.
Overview
The old keyword fetches the previous value of the specified field when you edit and resubmit an existing record of a form.
Note: This keyword can be used only in the "On Validate" block of a workflow when a record is edited.
Syntax
<variable> = old.<field_link_name>;
Param | Description |
---|---|
<variable> | To store the fetched old value |
<field_link_name> | Link name of the form field whose old value needs to be retrieved |
When a record is Created | ||
On Load | No | |
On Validate | No | |
On Success | No | |
On User input | No | |
Subform on add row | No | |
Subform on delete row | No | |
When a record is Created or Edited | ||
On Load | No | |
On Validate | No | |
On Success | No | |
On User input | No | |
Subform on add row | No | |
Subform on delete row | No | |
When a record is Edited | ||
On Load | No | |
On Validate | Yes | |
On Success | No | |
On User input | No | |
On Update | No | |
Subform on add row | No | |
Subform on delete row | No | |
When a record is Deleted | ||
On Validate | No | |
On Success | No | |
Other workflow events | ||
On a scheduled date | No | |
During approval process | No | |
During payment process | No | |
In a Custom Function | No | |
In an Action item in report | No |
Example 1
The following example fetches the value stored in the field - plan before the record is edited:
previous_plan = old.plan;
Example 2
The following example checks if the value of the field - plan has been changed when the record is edited:
if(old.plan != input.plan) { info "Plan has been changed"; }