# Property change row selected

**URL:** <https://forum.inductiveautomation.com/t/property-change-row-selected/4891>\
**Category:** Ignition\
**Created:** [July 26, 2012, 5:05pm UTC](https://forum.inductiveautomation.com/t/property-change-row-selected/4891 "2012-07-26T17:05:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [July 26, 2012, 5:05pm UTC](https://forum.inductiveautomation.com/t/property-change-row-selected/4891/1 "2012-07-26T17:05:42Z")

</div>

I’m trying to run a update query on an property change event script of the ignition table.  
My script currently looks like:

data = event.source.data  
if event.propertyName == “Selected Row”:  
oldData = event.oldValue  
idNumber = data.getValueAt(int(oldData), ‘motorID’)  
#Get values from table for Database Update  
…Querys

I would like it to run these querys when the selected row changes instead of each individual cell gets updated which I realize would be easier.  
Any ideas what I’m missing here?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 26, 2012, 6:12pm UTC](https://forum.inductiveautomation.com/t/property-change-row-selected/4891/2 "2012-07-26T18:12:06Z")

</div>

Yes, every property has a display name and a scripting name. In your case the table’s selected row property has a display name of “Selected Row” but a scripting name of “selectedRow”. So your code should look like this:`data = event.source.data
if event.propertyName == "selectedRow":
    oldData = event.oldValue
    idNumber = data.getValueAt(int(oldData), 'motorID')
    #Get values from table for Database Update
    ....Querys`
