# \[SOLVED\] How do you refresh a component binding through scripting?

**URL:** <https://forum.inductiveautomation.com/t/solved-how-do-you-refresh-a-component-binding-through-scripting/37826>\
**Category:** Ignition\
**Tags:** ignition80, vision\
**Created:** [August 17, 2020, 8:56pm UTC](https://forum.inductiveautomation.com/t/solved-how-do-you-refresh-a-component-binding-through-scripting/37826 "2020-08-17T20:56:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [August 17, 2020, 8:56pm UTC](https://forum.inductiveautomation.com/t/solved-how-do-you-refresh-a-component-binding-through-scripting/37826/1 "2020-08-17T20:56:58Z")

</div>

Specifically I have a button component on a template and I want to refresh the binding on the enabled property. An event happens on the main screen and several of these templates need to be refreshed. I can do this manually by saving the project but haven’t been able make the process automatic. Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 17, 2020, 9:11pm UTC](https://forum.inductiveautomation.com/t/solved-how-do-you-refresh-a-component-binding-through-scripting/37826/2 "2020-08-17T21:11:26Z")

</div>

You use the (terribly placed) `system.db.refresh()` function:  
[https://docs.inductiveautomation.com/display/DOC80/system.db.refresh](https://docs.inductiveautomation.com/display/DOC80/system.db.refresh)  
In some future release I’d like for us to move that to a `system.vision` package.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 17, 2020, 9:15pm UTC](https://forum.inductiveautomation.com/t/solved-how-do-you-refresh-a-component-binding-through-scripting/37826/3 "2020-08-17T21:15:57Z")

</div>

… and make it work with Vision Client Tags that have bindings. (:

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [August 18, 2020, 2:55pm UTC](https://forum.inductiveautomation.com/t/solved-how-do-you-refresh-a-component-binding-through-scripting/37826/4 "2020-08-18T14:55:16Z")

</div>

I think that did the trick…

```
if event.propertyName == 'instruction_Curr':
    component_Name = event.source.getComponent('btnDown')
    system.db.refresh(component_Name, 'Enabled')

    component_Name = event.source.getComponent('btnDown_Big')
    system.db.refresh(component_Name, 'Enabled')

```

I had even looked at that link and was thinking “well it says it’s for SQL stuff so I can’t use it…”
