# How to prevent a later onClick Action from executing in Perspective?

**URL:** <https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 2, 2026, 3:04pm UTC](https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696 "2026-02-02T15:04:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasper\_Clauwaert](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jasper\_Clauwaert](https://forum.inductiveautomation.com/u/Jasper_Clauwaert)\
**Post date:** [February 2, 2026, 3:04pm UTC](https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696/1 "2026-02-02T15:04:13Z")

</div>

Hi,

I have several _onClick Actions_ on a component in Ignition Perspective.  
The first action is a Script Action, and after that I have a _Popup_ action.

Depending on a certain parameter in the project, I want to **prevent the popup from opening**.  
I know I can use `system.perspective.togglePopup()` in a script, but I’m wondering:

**Is there a way to stop or “break” the action chain after the script action, so that the next action (Open Popup) does not execute?**

Something like:

```python
if customProperty:
  # do something, but do NOT execute action 2 (the popup)
else:
  # continue to action 2 (open popup)

```

Is this possible?

Thanks!

---

<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 2, 2026, 3:09pm UTC](https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696/2 "2026-02-02T15:09:08Z")

</div>

No.

Event actions run in parallel, and browser-side actions will be happening before script actions even get started in the gateway. (Reminder, all jython scripts run in the gateway.)

If you need the popup to be conditional, you need to make it part of the script.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [February 2, 2026, 3:19pm UTC](https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696/3 "2026-02-02T15:19:51Z")

</div>

The UI really does need to do a better job at conveying this as I've had numerous new comers ask me questions surrounding why actions further down the list happen before ones at the top.. Once you know, you know, but it’s the first time that catches most people out, including me

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 2, 2026, 5:25pm UTC](https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696/4 "2026-02-02T17:25:52Z")

</div>

😮‍💨

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/40697b60a5aa292682f1b51edb1522a9baadb5eb.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [February 2, 2026, 9:16pm UTC](https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696/5 "2026-02-02T21:16:43Z")

</div>

Haha, that would be useful too, but I was actually talking about the fact they all run in parallel rather than in sequence as it first seems. They have move up and down buttons which makes it even more confusing when you find out that they don’t run in order, sequentially, as being able to reorder them only further suggests that they run in that order

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 2, 2026, 10:18pm UTC](https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696/6 "2026-02-02T22:18:52Z")

</div>

They _are_ ordered, and if I remember right from when I first looked into the codebase a long time ago the frontend actions do block each other as you'd expect. It's not by accident that we put all the effort into making them reorderable. It's just that the gateway actions get kicked off to a different queue and end up working out of band. Or something like that...it's been a while.

---

<div class="post-metadata">

**Author:** ![Jasper\_Clauwaert](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jasper\_Clauwaert](https://forum.inductiveautomation.com/u/Jasper_Clauwaert)\
**Post date:** [February 3, 2026, 10:01am UTC](https://forum.inductiveautomation.com/t/how-to-prevent-a-later-onclick-action-from-executing-in-perspective/113696/7 "2026-02-03T10:01:12Z")

</div>

Thanks for your answers.

> [@nminchin](#):
>
> They have move up and down buttons which makes it even more confusing when you find out that they don’t run in order

Because of that, I assumed it might be possible to create a conditional action that stops the next one from executing.
