# Getting Label value when running a grid update event script \[onEditCellCommit event\]

**URL:** <https://forum.inductiveautomation.com/t/getting-label-value-when-running-a-grid-update-event-script-oneditcellcommit-event/35219>\
**Category:** Ignition\
**Created:** [June 1, 2020, 5:08pm UTC](https://forum.inductiveautomation.com/t/getting-label-value-when-running-a-grid-update-event-script-oneditcellcommit-event/35219 "2020-06-01T17:08:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgorman](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@dgorman](https://forum.inductiveautomation.com/u/dgorman)\
**Post date:** [June 1, 2020, 5:08pm UTC](https://forum.inductiveautomation.com/t/getting-label-value-when-running-a-grid-update-event-script-oneditcellcommit-event/35219/1 "2020-06-01T17:08:33Z")

</div>

I am trying to get an adjacent label text that is in the same view to add as a parm to the update call. But am having issues get the container and locating the label component. I tried the parent.GetComponent and get Window first to call a GetComponent to no avail. My label object is ‘Label\_1’

def runAction(self, event):   
# Get the id of the row we edited.  
id = self.props.data.getValueAt(event.rowIndex, ‘LogDate’)  
**agent = event.source.parent.getComponent(‘Label\_1’).text**

```
query = "UPDATE MYTABLE SET %s = ?, LastUpdater = ? WHERE LogDate = ?" % event.column
args = [event.value,agent,id]
 
# Run the query with the specified arguments.
system.db.runPrepUpdate(query, args)
 
# Requery the database, so we can ensure it properly updated the table.
self.refreshBinding("props.data")
```
