Unique number format "00001" instead of 1,2,3

Hi,

Have some databases of samples with unique numbers.
It is simple to update the number: Do search for databases “unique number” :max + 1
I want to send the updated unique number in the format “QC-” and the number.
“QC-1”, “QC2” is not ok as A-Z result in QC1, QC11, QC12, QC2,QC20…
So I’m looking for the format: “QC-0001”, “QC-0002” to send to the database.
Only in that format I’m able to sort all QC numbers A-Z

Thanks a lot for your help!
Marco

Hey Marco,

How about something like this which gives you leading zeros up to four digits (or change the 4 to whatever you want.)

First an input box that is really just used to convert a number to text since we don’t have a modifier to do so:

Then create the “QC” value with a little regex and truncating when updating your database:

The Replace by value should be a string of zeros, then length of your desired string (4), which will match the truncated from end to value (also 4).

Credit: @mishav



Looking to accelerate your app development?

Development of Advanced Apps at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

2 Likes