Compare New and Old Values in Zoho Creator Form

Compare New and Old Values in Zoho Creator Form

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");
}
    • Related Articles

    • Trigger Zoho CRM Workflows on Record Creation with Deluge

      When creating a record in Zoho CRM using a Deluge function, the workflows are not triggered by default. If you want to trigger them, there is a parameter that should be added: wfTrigger=true. Here is an example: mapContact = Map(); ...
    • Get the Day of the Week from a Date in Zoho Creator

      If you need to get the day of the week from a specific date, you can use the text function toString("EEEE"). For instance, let's say you have field in a form named "Shipping_Date". The value in it is "01.01.2021" (1 January 2021). The function ...