Skip to main content
Nintex Community Menu Bar
Solved

Nintex Designer - using a number field

  • June 18, 2024
  • 3 replies
  • 95 views

Forum|alt.badge.img+2

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

Best answer by IvanK

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.

3 replies

IvanK
Nintex Employee
Forum|alt.badge.img+3
  • Nintex Employee
  • Answer
  • June 18, 2024

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.


Forum|alt.badge.img+2
  • Author
  • Rookie
  • June 18, 2024

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.


IvanK
Nintex Employee
Forum|alt.badge.img+3
  • Nintex Employee
  • June 18, 2024

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