refreshBinding not responding

In my Ignition Perspective project, I have a page named "order_tracking" containing a table component named "Table" under "order_tracking.root.Scanned". The data displayed in this table is stored in "order_tracking.custom.palletScanned".

I've set up a tag trigger to automatically update the table when the data changes elsewhere. However, manual additions or deletions made via buttons on the page are causing synchronization issues, likely due to PLC interactions.

To address this, I've attempted to manually refresh the binding after adding data using the script:

def runAction(self, event):
    # Code to add data to the database...
    
    # Attempt to refresh binding
    self.view.refreshBinding("custom.palletScanned")

Although the database updates correctly, the dataset in "order_tracking.custom.palletScanned" fails to refresh. It doesn't look like it's doing anything, no feedback whatsoever.

What could be the reason for this behaviour, and how can I ensure the binding refreshes accurately after data additions?

I suspect that you haven’t used the correct path to the component the binding is on.

If the custom property is on the table component then you will need to use the path to the table component. Right now you’re refreshing a binding on a custom property on the view.

The custom property is not on the table component. It is on the view. I use the data in more places than the table, so I query the raw data as a custom property on the view, and then the table data is bound to the custom property.
So when the custom property changes the table data will refresh as well.
But for some reason, I am having difficulties refreshing the custom property on the view.

The custom property "palletScanned" is on "loading_orders.custom.palletScanned"
image

Can you provide details about the type of binding you implemented on loading_orders.custom.palletScanned

I have a tag binding type, which only acts as a trigger.
Following is a script transform which queries the data and processes it.

That's why, I think. If the tag hasn't changed, the binding thinks it has nothing to do.

Am I not able to manually refresh the binding even though the tag hasn't changed?

I've seen similar reports, yes. I recommend you use a named query binding directly, not a transform.

1 Like

I tried using a named query with a script transform and refreshing the binding works now.

2 Likes