Skip to main content
Solved

Nintex Designer - using a number field

  • 18 June 2024
  • 3 replies
  • 32 views

I want to use a field in Nintex Designer (currently trying with the number field) with the minimum of 11 numbers and a maximum of 11 numbers.  If the account number has 10 or less, I want to have leading ‘0’’s to get a total of 11.  I thought using a rule would do this, but didn’t see it, but not sure if going about it in the right way.  Any assistance would be appreciated.

Example, if account number is:

5555555

I would like to add leading ‘0’’s so it would look like this:

00005555555

Thanks,

Lois

3 replies

Badge +2

Hi @millerlo 

You can create an expression which uses the Pad Left function (https://help.nintex.com/en-US/K2Five/userguide/5.3/Content/K2-Workflow-Designer/Use/ContextBrowser/Functions/Functions.htm#:~:text=Result%3A%20%22ample%22-,Pad%20Left,-Pads%20a%20string) and then replace field value with this expression in a rule.

Badge +2

Thanks so much!! PadLeft is what I needed.  I did change from a number field to a text field, not sure if I could have converted to a string, but it was just as easy to switch to a text field.

Badge +2

@millerlo  with padding zeros it will aready be a string, not a number. When you convert it to number the leading zeros will gone. 

Reply