Skip to main content
Solved

Invoice Number Formula

  • May 30, 2022
  • 0 replies
  • 181 views

I was hoping to create a field that's auto-generated with this format

[YY]+0000 <- where this increments by one every time a new invoice is added. Can someone help me with the formula?



------------------------------
frnmj
------------------------------

Best answer by MarkShnierYou

This should work as a formula text field.  The numeric portion will come from the [Record ID#] which is auto generated when you first save the record.


IF([Record ID#]>0,
List("-",
Right(ToText(Year(ToDate([Date Created]))),2),
PadLeft(ToText([Record ID#]),4,"0")))

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
The current year is 2022

Are you looking for  a result like this

22-0010 for invoice #10?
​ and in 2023 the number would just keep counting up from the last invoice # the previous year?   ie it would not reset back to 1 (that is difficult to do).​

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------