How to count row in the table

1
0
-1

Hello,

Does anybody here know how to count rows in the table widget and display the count result in the UI? for example i want to count how many table rows of my pending vacation request table and display the count result in the UI.

thank you

1 answer

1
+1
-1
This one is the BEST answer!

Actually you don't really need to count the number of rows. You rather need to count the number of objects in the array that is used to populate the table. If you have a variable with the content of the table named tabledata you can create a JavaScript variable with the following script to get the number of rows: return $data.tabledata.length. You can then using a text widget to display the information.

Comments

Submitted by yogabaskara17_1... on Wed, 11/20/2019 - 02:00

thanks antoine it worked. I followed as your instructed. thank you very much

Notifications