Issue passing parameter to window using system.util.retarget

Hello,
I one of my project I am trying to Open a window on another project on same gateway, though the window opens correctly the parameter I am trying to pass doesn’t show up in the Window.

Project 1:
Script on template Label component/Mouse clicked:

selectedSite = event.source.parent.SiteID

system.util.retarget("Project_1",None,{'selectedSite': selectedSite , 'isRegional': True},["Site Views/Site Dashboard"])

Project 2:
Snap of Site Dashboard Template Parameter, though the selectedSite has binding to one of the dropdown component it shouldn’t hamper passing the parameter right? I tried passing to another parameter for testing, slectedSite1 which has no binding but result is same:

Thanks !

Your expectations for params are wrong. They do not act like window parameters, but as jython globals. Per the docs for system.util.retarget(). The new client project needs to use system.util.getGlobals() to retrieve them.

1 Like

So in Project 2 I can access the value at

system.util.getGlobals()['selectedSite']

Please correct me if i am wrong.

https://inductiveuniversity.com/videos/retargeting/8.1

1 Like