cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
f_falomir
Nintex Newbie

How to format a number to a three characters string

Jump to solution

Dear all:

I have a number between 0 and 999, and I would like to format it as follow:

If <10:                         00X

If >=10 and <100:       0XX

If >99:                         XXX

it means, to have a three characters string to allow to be sort properly...

I don't know if using regular expression I can do it...

Thank you very much in advance...

Labels: (1)
0 Kudos
Reply
2 Replies
paul_crawford
Nintex Newbie

Re: How to format a number to a three characters string

Jump to solution

Hi Francisco Falomir Arias

Use a build string action and the inline function of PadLeft

fn-PadLeft({YourNumber},3,0)

where 3 is the length of your required string and 0 is the character to pad.

Hope this helps

build string‌ padleft‌ leading zeros‌

View solution in original post

Reply
f_falomir
Nintex Newbie

Re: How to format a number to a three characters string

Jump to solution

It works fine!

Thank you very much and have a nice day!

Reply