To get the functionality that you want, we need to separate each table out into separate functions. This also means that we need to specify a different CSS Class for the "Row Number" field in the second table (in my example, I'm still using "rowNum" for the field in the first table, and "rowNum2" for the field in the second table).
The CSS designator for each function should be the "Add" button for each table, respectively (for yours, one will be "#q102" and one will be "#q105").
The next issue is that the "cf-table-block" designator is telling the function to look through ALL tables on the Form, which is why both tables are being included as part of the same number chronology. To remedy this, you can replace ".cf-table-block" with the CSS designator for only THAT table (respective for each function):
![[image]](https://na.myconnectwise.net/v4_6_release/api/inlineimages/MCCi/0b3df804-e49d-4888-83d7-d090e0de6bec)
(it's usually on number higher than the "Add" button designator, but check to verify)
Alternatively, you can specify a CSS Class for the table as a whole (this is in addition to the "rowNum" designator on the actual field; this CSS Class with be on the whole table). In my below example, I specified the CSS Class "TableOne" for the first table, and "rowNum" for the "Row" field in the first table:
![[image]](https://na.myconnectwise.net/v4_6_release/api/inlineimages/MCCi/9a223c11-a421-428d-944e-ef7a8cca9251)
This tells that function (the one for the "#q102" click) to only look through the "TableOne" CSS Class for the "rowNum" CSS Class inputs, and add 1 to the current number of rows. This will get that function working regardless of anything that happens in the second table.
Next, we do the same for the second table (in my example, I've set the CSS Class "TableTwo" for the second table and the class "rowNum2" for the "Row" field in the second table). I am then creating a separate function (rowNumbering2) and a second "currentRow" variable (currentRow2):
![[image]](https://na.myconnectwise.net/v4_6_release/api/inlineimages/MCCi/06f5fbef-5acf-4bdc-a791-17b68eb1f411)
This separates each table into a separate function, with separate CSS Classes, and isolates the functions and actions to each table (so one table doesn't look at the other, and vice versa).
Below is the final code, as a whole:
![[image]](https://na.myconnectwise.net/v4_6_release/api/inlineimages/MCCi/6ecdc69c-5e3d-4c00-96c3-6ddb9c93c239)
This should get each of your tables functioning properly.