Skip to main content
Question

I'm attempting to generate a ""Unique"" identifier for a tracking number that is auto generating.

  • November 1, 2017
  • 0 replies
  • 159 views

I'm attempting to have a number generated using "TORC" as the beginning identifier
then the year. and then starting at 10000 and using the record ID#.

I'm new to "formulas and I am stumped
This is what I initially came up with but the error tells me that "There are extra characters beyond the end of the formula." 

"TORC"Year(Date d)"-"([Record ID#]+10000)

This is what I would like to see:
TORC17-100001
This topic has been closed for replies.

  • Registered
  • November 1, 2017

Your new field would have to be a formula text field by data type.

"TORC" & Year(Date d) & "-" & ([Record ID#]+10000)

see if that cleans it up a bit.


  • Registered
  • November 1, 2017
Try this.
"TORC" & Year(Date d) & "-" & ([Record ID#]+10000)

Not tested but try this.  Let me know if there are syntax errors.

Try this

"TORC"
& Right(ToText(Year([Date d])),2)
& "-"
& ToText([Record ID#]+10000)

I see everyone responded :)

I think my formula has the best chance for first round syntax errors being clean. 

The field for date d will need be used as [date d]

  • Author
  • Registered
  • November 1, 2017
Finally got it.

"TORC" 
& Right(ToText(Year([Request Date])),2) 
& "-" 
& ToText([Record ID#]+10000)

Thank you everyone....

  • Registered
  • November 2, 2017
I also (as a result of attempting to automate a manual input process) am attempting to do the same thing.  However, my question is about the structure rather than the formula.

Being new to QB, I'm having to decipher what you guys are saying about the fields.

In a new test table, I created a formula-text field and placed the above formula in it.  I created a 'Request Date' field to satisfy the arguement, and it populates the 'TORC-' but not a number.

Could someone please briefly explain what else I'm missing to test this?  The Noob wants to learn.

Thank you so much in advance!

-Kyle

Are you viewing a saved record?  That full formula will not calculate until the record is saved and a Record ID# is assigned to that record.

Also, please post your formula.

  • Registered
  • November 2, 2017
No need.  For some reason, the minute I read your post, I got it.  Duh.  It's not going to generate until save.

I'm so sorry I wasted your time, and thank you so much for your help.

-Kyle