# Pass popup parameters back to main window

**URL:** <https://forum.inductiveautomation.com/t/pass-popup-parameters-back-to-main-window/56485>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [February 23, 2022, 10:34pm UTC](https://forum.inductiveautomation.com/t/pass-popup-parameters-back-to-main-window/56485 "2022-02-23T22:34:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcs226](https://avatars.discourse-cdn.com/v4/letter/l/848f3c/32.png) [@lcs226](https://forum.inductiveautomation.com/u/lcs226)\
**Post date:** [February 23, 2022, 10:34pm UTC](https://forum.inductiveautomation.com/t/pass-popup-parameters-back-to-main-window/56485/1 "2022-02-23T22:34:43Z")

</div>

I have a main window that has a number of fields that the operator can select. When you click on the field , a popup window opens and I pass some parameters to it to configure what is display for the operator. Basically a single column table for the operator to select the required info. On double click, the information is captured and the window is closed.

Is there a way on the close of the window to pass the selected data back to the main screen and apply it to the field that selected the popup window.

Tks

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [February 24, 2022, 12:20am UTC](https://forum.inductiveautomation.com/t/pass-popup-parameters-back-to-main-window/56485/2 "2022-02-24T00:20:18Z")

</div>

On the main window add the names of the parameters you want to pass. On the pop up close command button add a script that sends the parameters and closes the popup.

![Params](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/254f611861cd3831b2468634789baffc47611200.png)

 ![Script](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac338d506c6a4176cbb3c8ae616d7bdf7ed637e4.png)

---

<div class="post-metadata">

**Author:** ![lcs226](https://avatars.discourse-cdn.com/v4/letter/l/848f3c/32.png) [@lcs226](https://forum.inductiveautomation.com/u/lcs226)\
**Post date:** [February 24, 2022, 2:48pm UTC](https://forum.inductiveautomation.com/t/pass-popup-parameters-back-to-main-window/56485/3 "2022-02-24T14:48:46Z")

</div>

Thanks for the reply but I am not doing this in perspective but in vision. It looks like I can try similar commands that apply to vision.

---

<div class="post-metadata">

**Author:** ![Bryant\_Neuenschwande](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@Bryant\_Neuenschwande](https://forum.inductiveautomation.com/u/Bryant_Neuenschwande)\
**Post date:** [February 7, 2024, 1:18pm UTC](https://forum.inductiveautomation.com/t/pass-popup-parameters-back-to-main-window/56485/4 "2024-02-07T13:18:58Z")

</div>

Were you able to get this to work in Vision. I have a application where I would really like to be able to pass values from the popup back to the base main window on the popup close.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 7, 2024, 1:42pm UTC](https://forum.inductiveautomation.com/t/pass-popup-parameters-back-to-main-window/56485/5 "2024-02-07T13:42:11Z")

</div>

Pass strings for window name, component path, and property name as window parameters (root container custom prop names).

Then you can use `system.gui.getWindow()` to retrieve the window object, `.getComponentForPath()` to retrieve the target component object, then python's built-in `setattr()` to apply your changes.
