Hi all,
Sorry for this dummy question, but…
I checked everywhere and, when I want to get selected row number, I can use .getSelectedRowCount()
.
Please, could someone tell me whats wrong here?

Im using this script in the button and Im getting this error;
If the problem at command, please correct me with correct one.
Btw, I tried v8.1.9 and v8.1.12
Based on the error, it seems like getSelectedRowCount
is being called on something other than a Table component. Are you certain the name of the table you’re trying to access is Tbl_Employess
?
1 Like
For debugging, I’d recommend printing both the component you’re getting and it’s full type (literally just print type(someVariable)
1 Like
A power table does not have the getSelectedRowCount()
function, which is probably what you are using.
Vision - Power Table - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)
For power tables, do this instead
a = len(event.source.parent.getComponent('Tbl_Employees').getSelectedRows())
Also, I just noticed a probable typo, you have Tbl_Employess
instead of Tbl_Employees
1 Like
Ah, thank you. you’re right using power table and with len() its working 
you caught me… even table real name is Employess, I noticed when you said…