How to create a generated number

Do you know how to create a generated number e.g. for invoices: Year + ascending number (2022000001)?

You need 3 fields for it:

    1. field: Invoice date - data type: Date (this field is important for year in the generated number)

    2. field: Id (Internall Id) - data type: Number

      - select the Automatic identifier 1..X in advanced settings
      - choose column: Invoices date – Year (same row as Automatic identifier 1..X)
      - (This field is for counting only. You can hide it in the edit form and in the grid using uncheck this option in the advanced settings.)



    3. field: Number - data type: Calculated field – insert this code: Invoice date.substr(0, 4) +Internall Id.toString().padStart(6, '0')




Save all these settings and you’re done!

Thank you for reading this.

With kind regards,
Soňa