[Solved] Refresh binding on Ignition Edge

Ignitionb 8.1.3

Is there an equivalent to system.db.refresh() for Ignition Edge installations? I want a function similar to a refresh button for a Power Table’s Data property. In the past I have used something like the following on a propertyChange script:

system.db.refresh(table, 'data')

Ultimately, I think we can all agree that this refresh() function does not belong in system.db.*. In the meantime, what can I do about this? Is there a way to get around this? Perhaps a different way to refresh?

Edit: This is a Vision Application

Hi @etknorr, where is your data being derived from?

As @matthew.ayre said in his post that he deleted? Perspective has a refreshBinding method for that:


1 Like

@nminchin I deleted it because there was the mention of the ‘Power Table’ so I assumed we were talking Vision :slight_smile:

But you’re right the OP doesn’t mention which is being used, so I guess that is the true question :sweat_smile:

To ass-u-me is to make an ass out of you and me :laughing:

True, I passed right by that detail haha. I guess we’ll find out if it answers the question or not!

Edit : actually the more I read it now, the more I think you’re right, it is for Vision, since the db library doesn’t exist in Edge…
I think your only option is to do some dodgy way like incorporating another property into the binding to force it to reevaluate the binding. For example an if statement with a custom bool property as the condition and both results set to the dataset. Then just toggle the bool to refresh:

1 Like

@nminchin it was an early start for me, and likely a late start for you? We both fell into the same trap :sweat_smile:

I was thinking along the same lines, which is why I was interested on where the data was coming from (and whether it even needed to be refreshed, for example if bound to a tag it should update automatically on a tag change)

Thanks for the tips @nminchin and @matthew.ayre ! Sorry for not being clear, this is a Vision application I’m working with.

Background, I am using a script to process several tags into a single dataset.

Instead of refreshing the binding, I just ran the script again on PropertyChange and set it to the data property like this:

if event.propertyName == 'refresh':
	if event.newValue == True:
		event.source.data = ProjectScripts.prodToDataset()
		event.source.refresh = False

Thanks again for the tips!

1 Like