Every add of row in UI Designer a field will be sequential (See example)

1
0
-1

Hi,

Just want to ask how to create a sequential number every click of add in UI Designer. My scenario is this i have a form that contains a collection and every time I click add it creates new row with fields on it. I have a field and I want that field to contain a number and every time I add a row it creates a continuous number so that field will start at 1 and then when I click add collection 2 and so on. And when i save the form the sequence number also will be saved. How to do it using the default add collection in bonita UI Designer? See example below. Every time i click add button field 1 which is an input box will contain sequential number. And when remove -1 and once submit field 1 and other fields will be save in bdm.

Example:

Field 1 (Disable/Read Only) Field 2 Field3 Field 4 Add button
1
2
3

Please help

Thanks

1 answer

1
0
-1

Hi,

You can have a Javascript expression that read the size of the Collection and stores it in another variable, let's call it sequenceNumber.

This sequenceNumber variable contains then your sequence number.

Cheers

Notifications