When a user edits a record in a form of a Zoho Creator application, we sometimes need to compare the new values entered by the user with the old values that were existing before the user made changes. Using this comparison, we can adapt the behaviour of a Validate or Submit workflow for instance.
Both values for each fields are accessible through the following properties:
- Old field value: old.FieldName
- New field value: input.FieldName
Example of a Deluge validate workflow taking advantage of this feature:
if (old.Product_Name != input.Product_Name)
{
// The name of the product has been changed by the user. Display a stateless form to validate this change
sQuery = "?Old_Product_Name=" + old.Product_Name + "&New_Product_Name=" + input.Product_Name;
openUrl("#Form:Verify_Product_Name" + sQuery, "popup window", "height=100,width=100");
}