System Variables
System variables are a special class of predefined variables, which are already defined by the system, and values are assigned by the system itself. These variables are read-only. They contain values that cannot or should not be changed by the user.
These variables are used to refer to common information, like the email address of the logged-in user or app admin, the device type used to access the application, the current date, and so on.
Date Variables
The table given below lists the Zoho variables and value returned by the variables.
Variable | Returns |
---|---|
zoho.currentdate | Current date in the format specified in Application settings. |
zoho.currenttime | Current date and time in the format specified in Application settings. |
String Variables
The table given below lists the Zoho variables and value returned by the variables in a private and public application.
Variable | Private app / Logged-in user | Public app / Logged-in user | Public app / Public user |
---|---|---|---|
zoho.loginuser | Username of the currently logged-in user | Public | Public |
zoho.loginuserid | Email address of the currently logged-in user | Null | Null |
Other Variables
Variable | Returns |
---|---|
zoho.adminuser | Username of the Application owner |
zoho.adminuserid | Email address of the Application owner |
zoho.appname (applicable only to Zoho Creator) | Application link name of the current application |
zoho.ipaddress | Public IP address of the current user The value is displayed as null when the user is not in session. |
zoho.appuri (applicable only to Zoho Creator) | Application details in the format: /<admin_username>/<application_link_name>/ |
zoho.device.type | Type of device used to access the application. Returns a string "web", "phone", or "tablet" |
Note:
- The variable zoho.device.type is currently supported only in Zoho Creator.
- It's also currently not supported for field rules events in forms.
- The default value will be web for workflows where it's not possible to return the exact device type. For example, when used in Schedule workflows.
The system variable zoho.device.type is used to get the information of the end device type. The variable will return the device types web, phone, or tablet.
For example, in the development of a shopping application, you can make use of this system variable to fetch the device type and then adjust the interface elements, styling, and layout based on the user's preferred device type. This ensures an optimized journey for users accessing their Creator application platform across web, tablets, or mobile devices. The super admins and admins who manage the application's dashboard and review analytics, or the users shopping, can each experience the application tailored to their device, thereby enhancing user engagement.
A few system variables have values that differ from user to user. Which means, they are specific to the user account. For example, the system variable zoho.loginuserid which returns the email id of the logged in user. For every individual account, this value will vary. And a few system variables are the same for all user accounts. For example, zoho.currentdate which returns the current date value.
The availability of system variables depends on the product you use.
Examples
1) The following snippet sets the Date field with the current date when the form loads.
2) The following snippet returns the link to the required application.
3) The following snippet displays the device type that's used by a user to access the application.