Consecutive Ticket Number

Hi Coda Community:

I’d like to create a form for our online store that generates a warranty claim. Each Waranty Claim should have a unique Warranty Number, for example “WA0020”. How can I formulate the solution for the column “Warranty Number”?

I’m trying with “value for new rows: Concatenate(“WA”,RowId(thisRow))” but the result is “WA4”, for example. That means, no zeros are added and when a row is deleted (for example, WA4) it will continue with the next.

Hello @Juan_Pablo_Ibarra_Chapoy!
There is a formula called Format() that does exactly what you need

In your case it would be:

Format("WA{1:0000}", RowId(thisRow))

RowId() is the most robust way of getting a unique number, even if sometimes they are not consecutive when you delete rows so I recommend you to use this one.

2 Likes

HI Juan,

Welcome to Coda!

As always, there are many ways to skin a cat.

Saul’s way is great. But sometimes you need a number that is distinct from the row id, for example you create the sequential number from two different tables, or you need to restart the counter for some reason. (New year, new month, etc)

Then the below provides a way:

2 Likes