Learning Objectives
-
Understand the reset mechanism and update logic of autonumber fields in HAP.
-
Master how to configure autonumber rules through HAP to meet the business requirement of annual reset.
-
Learn to use workflows or Excel import functions to batch update the autonumber of historical data to adapt to new business specifications.
-
Improve the ability to use HAP to solve enterprise data standardization and historical data governance issues.
Scenario Case
As an innovative software vendor, MEGA Technology holds multiple large-scale marketing events every year. To efficiently manage these events, the company has built an "Event Management" application on HAP.
Initially, for rapid launch, the event number adopted the simplest rule: Campaign-Natural Number ID (e.g., Campaign-1, Campaign-2, Campaign-3...). This rule was simple and easy to implement, but by the end of 2024, with the surge in the number of events and rapid business development, the original numbering rule exposed the following issues:
-
Lack of time dimension: The natural number ID alone cannot intuitively determine which year the event was created, bringing inconvenience to cross-year event data statistics and queries.
-
Unclear annual numbering: Events from all years use a continuous numbering sequence, resulting in increasingly long numbers and failure to clearly reflect the number of events each year. For example, the first event in 2025 might be Campaign-158 instead of Campaign-1
MEGA Technology plans to fully upgrade the event numbering rule starting from 2025. The new numbering rule: Campaign-Creation Year (YYYY)-Natural Number ID, with the natural number ID automatically reset every year. (e.g., the first event in 2025: Campaign-2025-1).
In implementing the new numbering rule, MEGA Technology hopes to achieve the following requirements:
-
Realize automatic annual reset. Ensure that at the start of each new year, the natural number part of the number automatically starts counting from 1. Use the reset setting of the autonumber field in the HAP to set the reset cycle to "Annually".
-
Update 2025 historical data. At the beginning of 2025, there are a number of historical events still numbered according to the old rule. To unify data specifications, it is necessary to batch update the 2025 historical event numbers, changing the Campaign-N format to the Campaign-2025-N format.
-
The numbers of new events added in 2025 need to increase based on the historical quantity. For example: There are 3 existing events in 2025. After updating the numbering rule, the number of new events in 2025 should start from 4.
Operation Guide
Set New Numbering Rule with Annual Automatic Reset
-
Select the autonumber field, add a rule, set the creation time, and customize the date format as "YYYY-".
-
Set the number, set the cycle reset to "Annually Reset", and set the start value to 1.
Update 2025 Historical Data
Method 1: Import via Excel
-
Batch select the records to be updated and click "Export info".
-
For the exported fields, select "Record ID", "Event Name", and "Event Number" only. The Record ID is used to judge duplicate coverage updates during import, and the event Name is used to identify specific records.
-
Open the exported Excel, set the correct event numbers, and save.
-
Import Excel, check "Identify duplicates", and select "Record ID" as the Matching Field to override duplicate content.
-
After the import is completed, the event numbers are updated to the modified numbers in the Excel.
Method 2: Update via Workflow
-
Add a "Manual Numbering" text field and fill in the new event numbers into the "Manual Numbering" field.
-
Add a custom action, enter the workflow configuration page, add an "Update Record" node, and update the "Event Number" to the "Manual Numbering".
-
Batch select the records to be updated, click the button, and update the event numbers via the workflow.
Increment Based on Historical Quantity
-
Reset the autonumber, set the number of the next record to 4, click "Reset". Add a new record, and the number will be Campaign-2025-4.
-
After the reset is completed, the number of the latest event created in 2025 is Campaign-2025-4.
Hands-on Practice
Now, click the "Open the Practice App" button in the upper right corner of the page to access the hands-on application designed for this course, and start practicing!