Skip to main content

Generating a Serial Number When a Form Is Opened

Introduction

The serial number generated by this method increases each time the form is opened, regardless of whether the form is submitted. Therefore, this method has the following characteristics:

  • Serial numbers may contain gaps.

  • Serial numbers will not be duplicated.

This method is suitable for scenarios where consecutive serial numbers are not required.


Application Scenarios

This method can be used in Product Management, Order Management, HR Management, and other scenarios where consecutive serial numbers are not required.


Solution Design

  1. Use the RECNO() function to count the number of times the form is opened.

  2. Use the TODAY() function to obtain the current date, then use the TEXT() function to convert it into text as the date component of the serial number.

  3. Use the RIGHT() function to pad the count to a fixed number of digits, ensuring consistent serial number length.

  4. Finally, use the CONCATENATE() function to combine all components of the serial number.


What Does It Look Like?

After opening the form, the serial number increases regardless of whether the data is submitted.


How to Set up?

  1. Add a Single Line field to the form. Select the field and go to Field Properties > Initial Value > Formula > Edit.

  2. In the formula editor, set the formula for the Custom Serial Number field as follows:

CONCATENATE("Jodoo-",TEXT(TODAY(),"yyyyMMdd"),"-",RIGHT("0000"+RECNO(),4))
Did this answer your question?