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

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?

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.