"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 |
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"; }