# dataset.getRowCount() not returning an integer?

**URL:** <https://forum.inductiveautomation.com/t/dataset-getrowcount-not-returning-an-integer/33495>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [March 27, 2020, 9:33pm UTC](https://forum.inductiveautomation.com/t/dataset-getrowcount-not-returning-an-integer/33495 "2020-03-27T21:33:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmahaffey](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaffey/32/30949_2.png) [@tmahaffey](https://forum.inductiveautomation.com/u/tmahaffey)\
**Post date:** [March 27, 2020, 9:33pm UTC](https://forum.inductiveautomation.com/t/dataset-getrowcount-not-returning-an-integer/33495/1 "2020-03-27T21:33:43Z")

</div>

Here’s the basic code I have setup, I’m sorting datasets based on the criteria that they have a certain number of rows. But, the get.rowCount() function isn’t returning an integer?

```
for i in range(len(noteList)):
	for header in headerList[1:]:
		path = str(noteList[i]) + "/" + str(header)		
		param = system.tag.read(path).value		
		if param is not None: 
			if param.getRowCount > 0:
				newSet.append(path)	

```

The script console in the designer says something about a bound method, and is printing out this:

15:32:29.776 [Browser Events Thread] INFO Perspective.Designer.BrowserConsole - \<bound method com.inductiveautomation.ignition.common.BasicDataset.getRowCount of Dataset [0R ? 4C]\>

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 27, 2020, 9:37pm UTC](https://forum.inductiveautomation.com/t/dataset-getrowcount-not-returning-an-integer/33495/2 "2020-03-27T21:37:33Z")

</div>

You are missing the parentheses. The pair after the function name that cause it to be executed instead of returned. Functions are first-class objects in python and can be passed around like any other objects.

You may be confusing jython’s ability to take methods like `.getRowCount()` and interpret them as netbeans-style getters, which allows you to type `.rowCount` instead.

---

<div class="post-metadata">

**Author:** ![tmahaffey](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaffey/32/30949_2.png) [@tmahaffey](https://forum.inductiveautomation.com/u/tmahaffey)\
**Post date:** [March 27, 2020, 9:39pm UTC](https://forum.inductiveautomation.com/t/dataset-getrowcount-not-returning-an-integer/33495/3 "2020-03-27T21:39:47Z")

</div>

Wow, that was embarrasing. lol. thanks

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 27, 2020, 9:40pm UTC](https://forum.inductiveautomation.com/t/dataset-getrowcount-not-returning-an-integer/33495/4 "2020-03-27T21:40:57Z")

</div>

Personally, I use the netbeans-style short forms wherever possible, simply to make my code more readable.
