Can I pass back parameters from a popup window to the parent window after popup is opened

I'm trying to send data back to parent window after a popup window is opened from the parent. There are options to pass parameters to the popup window instance while opening but not the other way.

I can use an external memory tag to get this done but I'm just exploring if there is a better way to do this.

Thanks in advance

Not conveniently, not by binding.

You have some scripting options:

  • You can retrieve a named window and write into its properties, if you always know the calling window name.

  • You can pass a window name and property name as string parameters into the popup. Then use those in your completion script to dynamically choose which window/property to write back to.

  • Or, in a pinch, you can use .putClientProperty() in the caller to store the caller's window object in a transient property of the popup window.

1 Like

Thanks a lot @pturmel , as always you save the day. I was thinking about the second option right after I created the post but your first one seems better since I know the calling window name.

It would be nice if I can use something like this system.gui.refresh(window) but I don't think it exists in 7.9. refreshing an entire window using the window path would be my goal here.

Doesn't exist in any version.

Hi @pturmel, I was trying to find a function that would let me write to a window properties based on the window path (from your first option) but could find any other than system.nav.openWindow(). I'm still trying to write back parameters to the parent window from another popup.

Thanks in advance!

You would use system.gui.getWindow to retrieve the window object, then use its .getComponentForPath() method to obtain the component object within the window.

1 Like

Perfect, thanks!! I was trying to do both with the same function that's why I got lost... smh.