AttributeError: 'array.array' object has no attribute 'getRowCount'

Hi,

I am working on a pop-up. When I click ‘Submit Sign Off’ button, then an action event handler is performed. Click ‘Submit Sign Off’ button returns with the error AttributeError: ‘array.array’ object has no attribute ‘getRowCount’. Below is the snippet of the popup and the error.

If you look at the pop-up, there is a table with ‘Time’, ‘Incident Time’ that is being passed from another window which is binded to dataset “devicesComment”. As you can see this works as the table popuplates and has 1 row. I don’t understand why I am getting error on getRowCount function line. Your help is highly appreciated.

I think you mean to use event.source.parent.getComponent(‘devicesComment’) on line 18, as I understand your comment the table component itself is called ‘devicescomment’. If instead you meant the data for that table is bound to a property called devicescomment, then instead on line 19 take out the ‘.data’ part so its just COMMENT.getRowCount().

Thank you for your response. Actually that dataset is in the root container of this window which I bonded to the table just to confirm that the data is being passed from another vision window. I will try your method and get back to you.

Thanks,
Faisal

I think part of the confusion is that Ignition’s basic implementation of datasets have a getData() method, which is automatically treated as a “data” property thanks to jython’s NetBeans treatment of getters and setters. The “data” property of a dataset yields a generic two-dimensional array of the underlying data. The “data” property of a table component yields a dataset. That pattern appears to have been cut and pasted inappropriately.

Your solution worked! Thank you.

devicecommentsRows = COMMENT.getRowCount()

Thank you for the detailed explanation. Appreciate all your help.