Skip to main content
1-Visitor
November 13, 2019
Solved

get current Datatable row count

  • November 13, 2019
  • 1 reply
  • 3905 views

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?

Best answer by zyuan1

Use this service instead:  GetDataTableEntryCount

1 reply

5-Regular Member
November 13, 2019

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

zyuan15-Regular MemberAnswer
5-Regular Member
November 13, 2019

Use this service instead:  GetDataTableEntryCount

xiaoqw1-VisitorAuthor
1-Visitor
November 13, 2019

ok. thank you. it helps