Skip to main content
Nintex Community Menu Bar

Hello,

I am migrating a workflow that uses the padleft function in on-prem environment and wondering how can this be done within the Automation cloud environment?  Basically there is a number field in a SharePoint list that needs 0’s added.  For example if the number is 1, then the result should be 001, if the number is 11 then then result should be 011 where the actual padding to the left is 3.  Just not sure which action to use to make this happen.  Thanks n advance

Hi @fortyone 

I checked the gallery and someone has built this into an xtension (along with some other actions) that you can download and add to your NAC tenant.  Here’s the link to the gallery post:

https://gallery.nintex.com/t/toolkit-for-nwc


Hi @fortyone,

Here is a workflow that uses existing actions that pads left with zeros to 5 digits.
You could easily modify it to pad left to 3 digits.
Export Key: m8NfiBGGcgTLNEq6GF2XyNS9zBksuMNiv993voZ63VpaQTM4N


Hi @fortyone,

Here is a workflow that uses existing actions that pads left with zeros to 5 digits.
You could easily modify it to pad left to 3 digits.
Export Key: m8NfiBGGcgTLNEq6GF2XyNS9zBksuMNiv993voZ63VpaQTM4N

This workflow does work good but is there anyway to force it to not add extra 0’s if its over 3 digits meaning if the number is 1 it will be 001 but if its 10 it should 010.  The On Prem padleft feature would only add enough 0’s to make sure the length was 3 values only.  Currently if anything is a double digit such as 10 it will be 0010 when we need it to be 010.  Thanks N Advance


Hi @fortyone,

I’d say you have not reconfigured the workflow correctly.
Here, try this one : NEQQZUECBCC6khHu1PaTpE3QAwEhZcaxBee7VUzmrA35EZqiS


Thanks a ton!  You are correct I was only using one part of the workflow instead of configuring it in full.  Working perfect now.  Thanks!


Hello, I am having the exact same situation. I need to create a string with leading 0 for a number with a maximum length. I am looking for something similar to the padLeft function in the Automation Cloud workflow. It seems like Simon Muntz has a solution. However, the export keys have expired. Could you please share the export key again? Thanks a lot!


Hi ​@zyy1999,

Welcome to the Community,

Here is an export of the workflow that pads left with zero’s up to 6 places.
Export key: n1t1r59nxc2xJasy3srKwq4yrqS23vAoqVPiazhx1wBsjjPeA
Valid until: 4 Feb 2025 - 6:39 PM
You can modify it to suit your needs.

I have also created a form plugin I haven’t gotten around to putting on the Gallery.

The control is configurable to pad left or right with whatever character you choose for the length of characters you need. This way, it is all done on the form, which you will agree is a more tidy solution after seeing the workflow 🙂. Once the user clicks away from the control, the padding is triggered.

Please take a look at the attachment.
 


Thank you very much for sharing your solution, Simon. I am able to add the leading 0 to the number in the workflow by following your suggestion. Thanks a lot!!!


Reply