Extension functions

this is the the code I used with the help of James Hunt of Inductive automation Tech Support to solve my issue.
if event.propertyName == ‘data’:
NextProductsTbl = event.source.parent.getComponent(‘pwrTblNextProducts’)
system.db.refresh(NextProductsTbl, ‘data’)

	ActiveProductTbl = event.source.parent.getComponent('pwrTblActiveProduct')
	system.db.refresh(ActiveProductTbl, 'data')

Attached is a screen shot as well.

Thanks for the great support!

I am trying to reference another component on a window from the onCellEdited event of a power table. I cannot seem to find the correct syntax as their is no ‘event’ available in the extension function of the power table component. Has anybody been able to do this?

def refreshpwrTblNextProducts(tableNextProducts = event.source.parent.getComponent(‘cntProductsToPrint’).getComponent(‘pwrTblNextProducts’)):

pwrTable = event.source.parent.parent.parent.getComponent(‘Root Container’).getComponent(‘cntProductsToPrint’).getComponent(‘pwrTblNextProducts’).data

def refreshpwrTblNextProducts(tableNextProducts = pwrTable):

system.db.refresh(tableNextProducts, ‘data’)

In an extension function, use ‘self’ wherever you would have used ‘event.source’ in an event script. So event.source.parent.getComponent(…) becomes self.parent.getComponent(…) and so on.

Phil, Thanks for your help, I will give that a try.