# System.db.refresh on a Root Container Dynamic Property (UDT)

**URL:** <https://forum.inductiveautomation.com/t/system-db-refresh-on-a-root-container-dynamic-property-udt/11385>\
**Category:** Ignition\
**Created:** [March 18, 2016, 2:18pm UTC](https://forum.inductiveautomation.com/t/system-db-refresh-on-a-root-container-dynamic-property-udt/11385 "2016-03-18T14:18:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karnick](https://avatars.discourse-cdn.com/v4/letter/k/c37758/32.png) [@karnick](https://forum.inductiveautomation.com/u/karnick)\
**Post date:** [March 18, 2016, 2:18pm UTC](https://forum.inductiveautomation.com/t/system-db-refresh-on-a-root-container-dynamic-property-udt/11385/1 "2016-03-18T14:18:20Z")

</div>

I know the subject of this post is a bit of a mouthful, but I am having trouble using system.db.refresh.

I have a UDT, where one of its members is a Query Tag. The UDT is a dynamic property of the Root Container on a screen. So, the item I’m looking to refresh (assuming rc is my Root Container object) is rc.MyUDT.QueryTag. So, I thought system.db.refresh(rc.MyUDT, “QueryTag”) would work, but I am getting an error that the first argument cannot be coerced to a string. I know the first parameter has to be a ‘component’.

Is what I’m trying to do possible? I need to make sure that given value is up to date before proceeding with the rest of my python code.

Thank you in advance!

Edit: Nothing?

---

<div class="post-metadata">

**Author:** ![cmisztur2](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmisztur2/32/4243_2.png) [@cmisztur2](https://forum.inductiveautomation.com/u/cmisztur2)\
**Post date:** [March 24, 2016, 1:38am UTC](https://forum.inductiveautomation.com/t/system-db-refresh-on-a-root-container-dynamic-property-udt/11385/2 "2016-03-24T01:38:50Z")

</div>

The script needs a JComponent.  
And it looks like the property of the JComponent must be bound to a DB query or browse tag.  
I don’t think this will work.

The way I got around something like this is to create a scan class that only scans when some memory tag changes.  
Then create a gateway timer script to execute every X seconds which writes to that memory tag.  
This timer will serve as the scan interval, triggering the scan class to execute.  
Then when you need ‘on-demand’ just write to the tag from a python script which would trigger the scan class to execute.
