# Closing initial pop-up upon on second pop-up populate

**URL:** <https://forum.inductiveautomation.com/t/closing-initial-pop-up-upon-on-second-pop-up-populate/87769>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 22, 2024, 8:22pm UTC](https://forum.inductiveautomation.com/t/closing-initial-pop-up-upon-on-second-pop-up-populate/87769 "2024-03-22T20:22:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pappu\_Gupta](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@Pappu\_Gupta](https://forum.inductiveautomation.com/u/Pappu_Gupta)\
**Post date:** [March 22, 2024, 8:22pm UTC](https://forum.inductiveautomation.com/t/closing-initial-pop-up-upon-on-second-pop-up-populate/87769/1 "2024-03-22T20:22:06Z")

</div>

I have implemented 'Save' button. On clicking on it, i am opening small pop-up. In this small pop-up, i have implemented OK button upon clicking which i am opening bigger pop-up. Question is that, on opening on bigger pop-up, how we can close the small one.

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [March 22, 2024, 8:24pm UTC](https://forum.inductiveautomation.com/t/closing-initial-pop-up-upon-on-second-pop-up-populate/87769/2 "2024-03-22T20:24:53Z")

</div>

Actually, the real question is:  
Vision or Perspective?

---

<div class="post-metadata">

**Author:** ![Pappu\_Gupta](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@Pappu\_Gupta](https://forum.inductiveautomation.com/u/Pappu_Gupta)\
**Post date:** [March 22, 2024, 8:32pm UTC](https://forum.inductiveautomation.com/t/closing-initial-pop-up-upon-on-second-pop-up-populate/87769/3 "2024-03-22T20:32:23Z")

</div>

Its perspective.

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [March 22, 2024, 8:52pm UTC](https://forum.inductiveautomation.com/t/closing-initial-pop-up-upon-on-second-pop-up-populate/87769/4 "2024-03-22T20:52:07Z")

</div>

If you're opening the pop-up through the "Event Configuration" window, make note of the "Identifier" value. Then, you can close the pop-up in a different Popup action by typing in the same Identifier.

---

<div class="post-metadata">

**Author:** ![Pappu\_Gupta](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@Pappu\_Gupta](https://forum.inductiveautomation.com/u/Pappu_Gupta)\
**Post date:** [March 22, 2024, 9:07pm UTC](https://forum.inductiveautomation.com/t/closing-initial-pop-up-upon-on-second-pop-up-populate/87769/5 "2024-03-22T21:07:03Z")

</div>

It is applicable in parametrized pop-up also.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 23, 2024, 12:09am UTC](https://forum.inductiveautomation.com/t/closing-initial-pop-up-upon-on-second-pop-up-populate/87769/6 "2024-03-23T00:09:03Z")

</div>

The parameters of the Popup do not matter. All you care about is the identifier (`id`) in use for the "first" Popup. This value must be passed to the "second" Popup. The second Popup must take the action to close the first Popup, OR it can send a page-scoped message - which the first Popup must be listening for.

```auto
system.perspective.closePopup(id="MyFirstPopupId")
system.perspective.closePopup(id="MySecondPopupId")

```

or

```auto
# requires the first popup have a configured message listener which invokes code to close the popup.
system.perspective.sendMessage("CLOSE_POPUP", payload={"id": "MyFirstPopupId"}, scope="page")
system.perspective.closePopup(id="MySecondPopupId")

```
