Have the ability to have numbered rows in a pdf report

Assuming I have a table with two fields:

Department, emp name

(there is laso a key)

I would like to create a pdf report that shows the list of emps in a given department. E.g. for department R&D this is the required report and provide a number to the left for numbering the list:

Emp list for department: R&D

Emp Name

  1. John Wane

  2. Mike Cohen

  3. Jabe Barkley

Basically just a row count number to the left.

See this post which I initiated.

@Suvrutt_Gurjar he gave a great solution to it.

My suggestion is to create virtual column to your target table you wish to output to PDF and then add app formula which will generate the sequential number dynamically based on the slice and selection of the row. Then print it on the workflow template, you will get the same result.

This is not working as expected if you add/delete rows from the table.
I have tried that