Zoho Deluge: Loop through 30 Minute Slots
- Category: Zoho Deluge
- Hits: 19055
This code snippet took me a while to do and the documentation is flaky so I thought I'd make a note here just in case I need to refer to it again.
Why?
I want to modify a picklist and fill it with options from a certain time of the day to the closing time of the day (working hours).
How?
The plan is to iterate through a 24-hour clock, enable adding to the picklist when the starting hour is found and stop adding when the closing hour is found. The picklist field is called "Time_Field".
Zoho Deluge - MD5 function
- Category: Zoho Deluge
- Hits: 18452
So this is NOT an article on how to create a MD5 function for an ETag in Zoho Deluge as I expected it would be. At time of print, the Zoho documentation (and Google search results) make no mention of using MD5 in an encryption task.
Why?
I'm trying to create an ETag for a synchronization process between Zoho Creator and Zoho CRM. Combining all the fields to compare into a single field can't be done via the documented methods (base64, urlencode or AES) as this exceeds 255 characters (it could be a multiline but this would defeat the objective of an Etag).
How?
Zoho Deluge - Hide Reset Button on Form
- Category: Zoho Deluge
- Hits: 13208
So another quick note as I couldn't find a solution on the forums. This is to hide the reset button on a non-stateless form (state form?). I have posted this on the Zoho forums as well but here goes:
Why?
Because I can. And because as someone said, a "reset" button is so 1990. I have a confirmation page and don't want the button to show so...
How?
Zoho Deluge - Get Full Day Name
- Category: Zoho Deluge
- Hits: 20880
This is a very quick note with the code to retrieve the full day name from a date (eg. "Monday").
Why?
If I use the toString() function to get the day, it only returns the first 3 letters of the day (eg. "Mon").
My_Date = today;
Day_Name = My_Date.toString("E"); // returns "Mon"
How?Zoho Deluge - Get English Ordinal
- Category: Zoho Deluge
- Hits: 19917
This is a very quick note with the code to determine the English ordinal of a date (eg. "st" of "1st"). So in a date, instead of "Tuesday, 6 November 2018", I could want "Tuesday 6th of November 2018".
Why?
Well there's a long a way to do it (but reliable). But being limited to the lines of code you can run (ref. "Maximum number of executable statements", anything that reduces the number of lines used would be an improvement. This is how I was doing it previously.
// get the date (eg. 1, 2, 3, ... 29, 30, 31)
This_Day_Date = My_Date_Field.toString("d");
// determine English ordinal
English_Ordinal = "th ";
if(This_Day_Date == "1" || This_Day_Date == "21" || This_Day_Date == "31")
{
English_Ordinal = "st ";
}
if(This_Day_Date == "2" || This_Day_Date == "22")
{
English_Ordinal = "nd ";
}
if(This_Day_Date == "3" || This_Day_Date == "23")
{
English_Ordinal = "rd ";
}
// display
info My_Date.toString("d") + English_Ordinal;
How?
Zoho Deluge - Get User Timezone, Country and Location
- Category: Zoho Deluge
- Hits: 20380
A quick article just as a note to get the users country information from a third-party API based on the given IP address.
How?
Well this is just a list of free 3rd-party APIs and the below code is dependent on these being online and working...
ZohoDesk & ZohoAnalytics: Display Ticket Attachments in Analytics Report
- Category: Zoho Desk
- Hits: 48866
A quick article with the code to download image attachments from a Zoho Ticket and then to upload the attachment to Zoho Analytics.
Why?
First of all, we couldn't find how to sync attachments from ZohoDesk to ZohoAnalytics using the integration. Other tables will sync but we couldn't find attachments, so our solution here is to create a data table and then to push the attachment from ZohoDesk to ZohoAnalytics using the API.
The use-case here is that a client wants customers to submit ZohoDesk tickets and upload photos of the problematic product to the ticket. They then want an Analytics report to show these photos.
How?
The following is simply the steps to create a data table in ZohoAnalytics, then the code to list a ticket's attachments and push them to the ZohoAnalytics data table.
Zoho Desk: Re-enable Desktop Notifications after clicking on "Not Now"
- Category: Zoho Desk
- Hits: 18657
This is a quick article to re-enable desktop notifications after having been prompted initially and having clicked on "Not Now".
Why?
I'm not sure when this prompt is supposed to prompt you again. A client of ours had accidentally clicked on "Not Now" instead of clicking on the "Enable". Documented below is how to get this to prompt you again.

How?
This largely depends on whether you are using the Google Chrome web browser. In this case version 100 and is correct at time of print.

