Skip to main content

Continuously Numbering Subform Rows Across Submissions

Learn how to automatically generate continuous sequence numbers for subform rows across multiple form submissions.


When to Use This Feature?

When submitting multiple records with subform data, you may need the row numbers to continue from the previous submission instead of restarting at 1.


How Does It Work?

This solution uses formulas to identify each subform row and retrieve the highest sequence number from the previous submission. The new row numbers are then generated based on that value.


What Does It Look Like?

For example, if the first submission contains three subform rows numbered 1, 2, 3, 4 and 5, the next submission will automatically start from 6.


How to Set It Up?

Step 1 Creating the Form

Create a form with a subform named Details and add the following fields:

Field Name

Field Type

Details

Subform

Serial No.

Number(Subform)

Random Code

Single Line(Subform)

Fixed Value

Single Line

Random Code List

Single Line

Current Max No.

Number

Previous Last No.

Number

Step 2 Configuring the Fields

Select the corresponding field and go to Field Properties > Initial Value.

Configure the following fields in the same order as the original example:

Field Name

Formula

Location

Serial No.

(SEARCH(Details.Random Code,Random Code List)-1)/36+1+Previous Last No.

Random Code

UUID()

Fixed Value

Custom default value: 1

Random Code List

CONCATENATE(Details.Random Code)

Current Max No.

MAX(Details.Serial No.)

Previous Last No.

MAPX('last',Fixed Value,Fixed Value,Current Max No.)

Note: In the MAPX formula, the first Fixed Value refers to the current form, while the second Fixed Value and Current Max No. refer to the existing records of the same form.

Step 3 Hiding Auxiliary Fields

To keep the form clean:

  1. Select the auxiliary fields and go to Field Properties > Field Permissions. Uncheck View to hide them.

  2. Go to Form Properties > Hidden Field Default Value and select Always Recalculate.

Keep Serial No. visible to display the numbering results.

Note: If multiple users submit records simultaneously, duplicate sequence numbers may occur. For the first submission, verify that an empty MAPX result is handled as 0.

Did this answer your question?