Retrieving variables in Zoho involves understanding two distinct but related concepts: application-scoped variables in Zoho Creator and predefined Zoho system variables available in Deluge scripting across services.
Why this matters
If you're building multi-form applications or automating workflows, you'll often need a single value — such as a configuration setting or a date — to be accessible everywhere without redefining it each time. Knowing how to declare and retrieve variables correctly prevents broken flows, stale data, and hard-to-debug scripting errors. This is especially relevant when working across Zoho Creator forms or writing Deluge scripts in any Zoho service.
> Note: Beam Help is independent expert support for Zoho — we are not official Zoho support.
---
Step-by-step
Step 1. Understand the two types of variables you may need to retrieve.
Before writing any code, clarify which kind of variable you're working with. Zoho Creator offers application-scoped Variables — declared once and usable across your entire Creator app, similar to how functions are reused. Separately, Deluge provides built-in Zoho Variables, which are predefined system-level variables available across different Zoho services. [1][4]
---
Step 2. Retrieve application-scoped variables in Zoho Creator.
Zoho Creator's Variables feature lets you define a variable at the application level and then reference it from any form, workflow, or script within that same application. To use a variable you've already declared:
- Open the relevant Deluge script (e.g., a form workflow or a function).
- Reference the variable by the name you assigned it during declaration — no additional import or initialisation is needed within the same application scope.
- Because these variables are centralised, any update to the variable's value is reflected wherever it is referenced across the app. [1][2]
This centralised approach makes it significantly easier to manage shared data across different forms and application components without duplicating logic. [2]
---
Step 3. Retrieve built-in Zoho system variables in Deluge.
When writing Deluge scripts — whether inside Zoho Creator, Zoho CRM, or another service — you can retrieve the current date and time using two predefined Zoho variables:
zoho.currentdate— returns today's date based on the format configured in your service's settings.zoho.currenttime— returns the current date and time, again formatted according to your service configuration.
These can be dropped directly into any Deluge expression without any prior declaration. [4]
Example usage in a Deluge script:
today = zoho.currentdate;
now = zoho.currenttime;
info today;
info now;
Both variables pull their format from the settings of whichever Zoho service the script is running in, so the output may differ between, say, Zoho CRM and Zoho Creator. [4]
---
Step 4. Reformat retrieved date/time variables if needed.
The default output of zoho.currentdate and zoho.currenttime is suited to basic logging but may not match the format required by your business logic or UI. Deluge provides date-formatting functions that let you convert these values into any format or time zone you need after retrieval. [4]
---
Step 5. Watch variable behaviour in email-triggered flows.
If you're retrieving variables that were created from an email trigger (for example, in Zoho Flow), be aware that the variable is only populated when the incoming data matches the structure used when the template was first set up. If the field values differ from the original template data, the variable may not be created at all, which can cause downstream steps in your flow to fail. [3]
---
Common pitfalls
- Template mismatch in email triggers: Variables extracted from email triggers in Zoho Flow are tightly coupled to the original template structure. If the incoming email contains different field values (even just a different name), the variable may not be captured, breaking the entire flow. Always validate that your email template covers all expected variations. [3]
- Format dependency on service settings:
zoho.currentdateandzoho.currenttimedo not return a universal format — the output depends on the date/time format configured in the specific Zoho service where the script runs. If you're moving scripts between services, double-check the format settings to avoid unexpected output. [4]
- Scope confusion between Creator variables and Deluge variables: Application-scoped variables in Zoho Creator are managed through the Creator interface and persist at the app level. Deluge's
zoho.*variables are read-only system values. Mixing up these two concepts can lead to errors when you try to assign a value to a system variable or expect an app variable to be available outside its declared application. [1][4]
---
What to check
- Confirm the variable scope: Verify whether your variable is an application-scoped Creator variable or a Deluge system variable — the retrieval method differs for each. [1][4]
- Validate date/time format output: After retrieving
zoho.currentdateorzoho.currenttime, log the value and confirm it matches the format your downstream logic expects, especially if the script runs across multiple Zoho services. [4] - Test email trigger templates with varied data: If variables are sourced from email triggers, send test emails with different field values to confirm the variable is captured correctly in each case, not just with the original sample data. [3]