For Zoho services only


I'm currently part of a wider delivery team at Ascent Business Solutions, recognised as a leading Zoho Premium Solutions Partner in the United Kingdom.

Ascent Business Solutions support organisations with everything from targeted technical fixes through to full Zoho CRM implementations and long-term platform adoption. Working as a team rather than a one-person consultancy allows projects to move forward consistently, with access to the right skills at each stage.

The team I manage specialises in API integrations between Zoho and third-party finance and commerce platforms such as Xero, Shopify, WooCommerce, and eBay. Much of our work involves solving integration challenges that fall outside standard documentation, supporting new ideas, new sectors, and evolving business models.

Success is measured through practical outcomes and return on investment, ranging from scaling small operations into high-turnover businesses to delivering rapid gains through online payments, automation, and streamlined digital workflows.

If you are looking for structured Zoho expertise backed by an established consultancy, you can contact Ascent Business Solutions on 0121 392 8140 (UK), email info@ascentbusiness.co.uk, or visit https://www.ascentbusiness.co.uk.

Zoho Deluge - Pad with leading Zeros

What?
There may be other articles out there documenting this but I can't keep trying to find these in Google so referring to my own website, this is a doddle for me to find each time.

Why?
I have to do this so often that it deserves an article. Though writing a whole page for this is probably unwarranted so I may rename this article later to common things I need to do in Zoho Deluge.

How?
So going through the forums you may find the following example:
copyraw
string padWithLeadingZeros(int finalStringLength, int startingNumber)
{
      return leftpad(toString(input.startingNumber), input.finalStringLength).replaceAll(" ", "0");
}
  1.  string padWithLeadingZeros(int finalStringLength, int startingNumber) 
  2.  { 
  3.        return leftpad(toString(input.startingNumber), input.finalStringLength).replaceAll(" ", "0")
  4.  } 

This looks like pretty old code and not wanting to cause offence, it isn't the JavaScript style or chain I like which appends the functions instead and is clearer for me personally to understand:
copyraw
// I want 010

v_NextIndex = 10;
// yields 10

v_NextIndexStr = v_NextIndex.leftpad(3);
// yields " 10"

v_NextIndexStr = v_NextIndex.leftpad(3).replaceAll(" ", "0");
// yields "010"
  1.  // I want 010 
  2.   
  3.  v_NextIndex = 10
  4.  // yields 10 
  5.   
  6.  v_NextIndexStr = v_NextIndex.leftpad(3)
  7.  // yields " 10" 
  8.   
  9.  v_NextIndexStr = v_NextIndex.leftpad(3).replaceAll(" ", "0")
  10.  // yields "010" 

Source(s):
Category: Zoho Deluge :: Article: 254

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com