BOUND CONST error

I am using the following code for expression binding of Timer component value property, to show the data in ignition table. But it is showing Bound Const error.
Can someone suggest, where I could be wrong?

if {Root Container.Timer.value}==0:
end = system.date.now()
start = system.date.addHours(end, -4)
table = event.source.parent.getComponent("DataTable")
results = system.alarm.queryJournal(journalName="Journal", startDate=start, endDate=end)
table.data = results.getDataset()

It looks like you are mixing jython syntax with Ignition expression syntax. Ignition expression bindings are not scripts. They can only have functions and operators, returning a single value. No assignments. No script statements.

2 Likes