Skip to main content

How to set the serial number self-increment

1. Usage scenarios

In the application, the serial number will be used. When configuring the serial number, we can configure the automatic backfilling of the serial number into the form when submitting the serial number. In this case, we will encounter a problem, for example, when we configure business association rules to use serial numbers, business association rules and serial numbers are triggered at the same time. Therefore, when business association rules are triggered, serial numbers are not involved, then we can generate serial numbers on the page and customize the format of serial numbers.

2. Video Display

此处为语雀视频卡片,点击链接查看:新流水号自增.mov

3. Procedure

3.1 create a form

Business order filling 」:Fill in the business order and generate a custom serial number on this page.

Business order report

"Serial number increment table 」:When you initiate a business order, insert data into the bottom table of the serial number.

Serial number self-increasing bottom table

3.2 custom serial number

Because the serial number needs to be self-increasing, COUNT can be used. However, when you use the current business to fill in the data COUNT of the report, when you delete a piece of data, the serial number will be repeated, therefore, every time we submit a piece of data, we insert the data into the bottom table of the serial number, and then use COUNT to calculate the amount of data in the bottom table. When deleting the data, the amount of data in the bottom table is not reduced, therefore, the serial number in the business reporting table will not be repeated.

3.2.1 configure Business Association formula

Each time we submit a piece of data, INSERT the data into the bottom table of the serial number.

Refer to the following formula. You can copy it directly. Note that you need to replace the component.

{"text":"INSERT(​流水号自增底表​,​流水号自增底表.流水号​,​流水号​)","marks":[{"from":{"line":0,"ch":7,"sticky":null},"to":{"line":0,"ch":16,"sticky":null},"value":"FORM-IE7664A1KNWTNNSOX6UVJ2AO06CU31UWVY0UKF/","invalid":false},{"from":{"line":0,"ch":17,"sticky":null},"to":{"line":0,"ch":30,"sticky":null},"value":"FORM-IE7664A1KNWTNNSOX6UVJ2AO06CU31UWVY0UKF/textField_kpmazp5x","invalid":false},{"from":{"line":0,"ch":31,"sticky":null},"to":{"line":0,"ch":36,"sticky":null},"value":"textField_kpmazp5x","invalid":false}],"isCmData":true}

3.2.2 edit serial number field configuration formula

Configure formula editing

3.2.3 edit formula

Customize the serial number style, such as "YD" string, date, serial number, serial number to obtain the amount of data corresponding to the bottom table, and obtain the above data in sequence and use the splicing function to splice together.

Due to the upgrade of the formula, the CONCATENATE function cannot be inlaid with the COUNT function. Therefore, use the single-line text component to configure the COUNT formula, as shown in the following figure:

The following figure shows the formula for setting the serial number field:

Configure the auto-increment formula of serial number

The formula is as follows:

Note:

  • You can directly copy the following formula. Replace the formUuid in the COUNT() formula with the formUuid of the serial number auto-increment table.
  • Change the form count field to the form count field of the business form
{"text":"CONCATENATE(\"YD\",TEXT(SYSTIME(),\"yyyyMMdd\"),\"-\",​表单计数​)","marks":[{"from":{"line":0,"ch":48,"sticky":null},"to":{"line":0,"ch":54,"sticky":null},"value":"textField_l3kx5q6a","invalid":false}],"isCmData":true}

-------------------- Get the latest information YIDA, welcome to follow US--------------------

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4