I have a root container script in a popup window that refreshes the values on the page from a database. The script works fine from a button on the page, but when I call it from visionOpenedWindow, it fails the first time the window is opened, but not after that. So, if I open it, error pops up, then I close it. Every time I open it after that, the script works fine. Below is the visionOpenedWindow script and root container script. The error that is returned is “common.script.Imm object has no attribute ‘db’”. Note that I also tried system.tag.readBlocking and had the same error (except ‘tag’ instead of ‘db’). I have a workaround by copying the root container script directly into the visionOpenedWindow script and it works fine. The only issue with that solution is that when I change the UpdateParameters script I’ll have to maintain the changes in two places.
Root Container Script:
Parameters = system.db.runQuery(“Select * from Table”, “database”)