Zoho Deluge: Generate a loop or list of any size
- Joel Lipman
- Zoho
- Hits: 3662
This is an article on a trick I picked up from one of our interviewees as well as apparently in one of the Zoho documentation manuals. It uses leftpad to create a string of a length, converts it to a list, then lets you generate an array or list of any size.
Why?
My use case here is to run a schedule that will populate a list with the upcoming dates for the next week (and for any numbers of weeks thereafter). This needs to be dynamic as it is a schedule run daily checking the availability of a staff member for the upcoming week.
How?
As mentioned, using leftpad takes 2 parameters, the first is the string to start with, the second is the number of spaces to pad with.