Automatic Project Numbering Using Reference Number | Community
Skip to main content
Level 2
December 6, 2023
Question

Automatic Project Numbering Using Reference Number

  • December 6, 2023
  • 2 replies
  • 2267 views

I'm setting up automatic project numbering using the last four digits of the reference number. This is the formula I'm using:

CONCAT("G24_" + TRIM(RIGHT("0000" + STRING({referenceNumber}), 4)))
 
This works except for one problem, It pulls in the last four characters, of which one is the separating comma: G24_,709
I don't understand why it's adding in the comma when it does not have a comma separator when I view the Reference Number in the project overview.
Reference Number
93709
 
Is there something I can write into the formula to eliminate the comma so it just gives me the last four digits?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

skyehansen
Community Advisor
Community Advisor
December 6, 2023

I'm not sure why you put the STRING command in there? Why would you not just use

CONCAT("G24_" + TRIM(RIGHT("0000" + {referenceNumber}, 4)))

 

(also not sure why the 0000 and TRIM were necessary but I left that in since it didn't seem harmful)

DaveBr5Author
Level 2
December 6, 2023

Thank you @skyehansen! That worked. I went round and round with that code yesterday. Thanks for the assistance.

RandyRoberts
Community Advisor
Community Advisor
December 6, 2023

I tried something like this when I first started in WF, not knowing those numbers would duplicate for every 10,000 objects created.

VicSellers
Community Advisor
Community Advisor
December 6, 2023

Hi @randyroberts - Do you know if there is any documentation on the recycling of reference numbers? I can't seem to locate it now, but do recall what you're saying in that they recycle it after a certain number is hit.

November 14, 2024

No they don't recycle them at all. If you're only using the last 4 characters and the actual reference number is say 5 characters then the last 4 characters will repeat every 10,000 iterations even after they've iterated into 6, 7, and 8 figures.

Example:

10001

20001

30001

40001

110001

10020001

6594630001

76184359740001

they are still unique numbers but since you're only using the last 4 they are the same.


Hi @randyroberts  I'm looking to do something similar and shorten our project numbering digits as much as possible. If we wanted to go from the six digit reference number down to three, it would repeat every 1,000 iterations, correct? And are reference numbers unique to the objects (meaning I'd only have to worry about repeating every 1,000 projects and not 1,000 projects plus tasks and issues)?

 

Thank you!