Scripting Problem

I am currently programming a 7.7.5 system and using a string literal in a script to open a window from a template.

Here is my script:

popup = “Popups/%s/ToD Setpoints” %event.source.parent.Sites.PopupFolderName
window = system.nav.openWindow(popup)
system.nav.centerWindow(window)\

I get the error:

Traceback (most recent call last):

File “event:actionPerformed”, line 7, in

ValueError: Window Popups//ToD Setpoints does not exist.

Is this a bug in 7.7.5? I’m currently using this same exact script in 7.8.x. Any work arounds?

Window Popups//ToD Setpoints does not exist

means that the string replacement is inserting null - so event.source.parent.Sites.PopupFolderName is not populated with anything.

Is there anything that could be making PopupFolderName change? That looks fine code-wise, its having an issue because the %s in popup assignment is, for some reason, coming up blank.

One thing I’m wondering about, is what is “Sites”? Seems odd that you’re calling that and then something in that. Sites isn’t a normal field name so its a custom field, and I don’t think theres any custom field types that have a property of its own like that. Maybe sites is a component and PopupFolderName is a property of it? Use .getComponent(“Sites”) instead of just .Sites to get that, in that case.