Multiple rows on power table

Disclaimer: New Ignition User
I’ve created a historical transaction group for multiple values from my PLC and have a trigger. I am trying to create a power table that lists all the values when there is a trigger event, with multiple rows show the last 5 historical values recorded on trigger events.

Where I’m at:
My Power Table will only list the row I select using the DB Browse>Generated SELECT Query, and won’t update.

Example:
SELECT RunEfficency, Total_panels_per_ShiftOrRun, VolumeSumof38, t_stamp, ProdStr FROM mdo_report WHERE mdo_report_ndx = 8

Try changing your binding type to SQL Query or Named Query and do something like this

SELECT TOP 5
	RunEfficency,
	Total_panels_per_ShiftOrRun,
	VolumeSumof38,
	t_stamp,
	ProdStr
FROM 
	mdo_report 
ORDER BY
	t_stamp DESC

As far as refreshing the table goes, you could use the polling rate on the binding, but I prefer to create a custom property and use a property change script to run the update on demand.

  1. Create a custom property on the root container named ‘trigger’
  2. Bind the property value to the same tag you use to trigger the transaction group
  3. Place the following code in a property change event script on the root container
if event.propertyName == 'trigger':
	if not event.source.trigger:
		table = event.source.parent.getComponent('Power Table')
		system.db.refresh(table, 'data')

Great! I’ll try this out, thanks!