Need a field formula that inserts a unique and sequential number?
What is the formula to insert or create a unique and sequential number for a record? I need that number to never change by itself, in other words, a customer's account number never changes and is unique. The built-in Id field does not do what I need since Ninox changes those numbers when synced across devices.
34 replies
-
Good to know. Thanks for the update.
Happy Invoicing.
Tim
-
Related to the requests for an automatically incremented number, these people seem to make it simple:
https://support.knack.com/hc/en-us/articles/230231768-Start-an-Auto-Increment-Field-from-Any-Number
-
By the way, my post wasn't meant to plug that product, just to show how a simple implementation of a sequential number.
-
Problem is when you make use of the record ID is when you delete a record the numbers wouldn't be in a sequence annymore. So 2019+recordID is not a good idea.
-
Is it possible to make TFH001 sequential then TFH002, I understand the sequential scriptt but I ideally need it with the suffix TFH
-
Hi Paul,
Please download the template "Invoices" via the button "New database". There you will find the formula in the table properties of the invoice table in the option "Trigger after create".
In that formula you can exchange the suffix.
Kind regards, Jörg
-
I also have som problems with the Invoice numbering. I want number my invoices without the year-prefix (e.g. 120, 121, 122 etc...) and start on a specified number.
When inserting the code mintioned here earlier
let before := max((Table1).Invoice No.);
Invoice No. := before + 1To make sure there aren'r anything I've messed up I tried this with a new epty Invoice template.
When using the code above it results in 1, 11, 111, 1111, 11111 etc.
How do I correct that and how I define a start value?
-
Have also a look at this thread : https://ninoxdb.de/en/forum/use-cases-5abd0b9c4da2d77b6ebfa395/create-tables-with-autonumbering-with-ease.-5d5ee82ab6ba1f2dab0664b4
-
Mats before must be a number let before := number (max((Table1).Invoice No.));
Invoice No. := before + 1
Content aside
- 5 yrs agoLast active
- 34Replies
- 14310Views