Skip to main content
Nov 13, 2019 4:17 AM UTC
Solved

get current Datatable row count

when I write services behind current datatable, I need to get number of rows of this datatable.

this is my code I used: 

var result = me.getRowCount();

the output should be integer.

 

but after I run this code, here is output error says: cannnot find functon getRowCount in object com.thingworx.datatables.

 

how to fix this problem?

zyuan1Answer
Nov 13, 2019 7:36 AM UTC

Use this service instead:  GetDataTableEntryCount

3 replies

Nov 13, 2019 7:35 AM UTC

The getRowCount() service is only used in infotable, so it returns the size of a infotable chunk, not the Datatable entity.

zyuan1Answer
Nov 13, 2019 7:36 AM UTC

Use this service instead:  GetDataTableEntryCount

xiaoqwAuthor
Nov 13, 2019 10:37 AM UTC

ok. thank you. it helps