# Avoid duplicate confirmation dialogs during tag write operation

**URL:** <https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 6, 2025, 1:38pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994 "2025-11-06T13:38:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![namrathae02](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@namrathae02](https://forum.inductiveautomation.com/u/namrathae02)\
**Post date:** [November 6, 2025, 1:38pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/1 "2025-11-06T13:38:16Z")

</div>

I have a vision button that displays an ignition in-built confirmation popup. When the user clicks **OK** in the popup, the script writes to a tag and updates the button text.

However, if the button is clicked again immediately after clicking **OK** (before the tag write completes), the popup appears again.

How can I prevent the popup from appearing until the tag write has fully completed?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [November 6, 2025, 1:46pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/2 "2025-11-06T13:46:13Z")

</div>

You could disable the button first thing in the script. Then enable it after the tag write attempt. You might want to check the tag write return value for success and add a try/except so you don’t end up in an undefined state depending on what you script looks like.

---

<div class="post-metadata">

**Author:** ![namrathae02](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@namrathae02](https://forum.inductiveautomation.com/u/namrathae02)\
**Post date:** [November 7, 2025, 1:48pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/3 "2025-11-07T13:48:19Z")

</div>

we are having multiple components  
It is difficult to handle this for individual component is there any way to handle this globally

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [November 7, 2025, 2:47pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/4 "2025-11-07T14:47:47Z")

</div>

What do you mean multiple components? You could use a single root-level property (or vision client tag) to enable/disable the components until the write is complete and then bind that to all components that you need temporarily disabled and then re-enable with a gateway event script.

Even that doesn’t sound like a great idea, so I guess the question we should be asking is - is there a better way to handle this than what is currently being used?

Is there a problem that is caused by writing the tag twice?

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [November 7, 2025, 3:18pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/5 "2025-11-07T15:18:19Z")

</div>

Would checking the value of the tag or another prop during the script and before writing it help? Update the prop first in the script before writing. That way, even if the confirm popup appears again it doesn’t actually do anything if the tag has already been written.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [November 8, 2025, 2:42am UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/6 "2025-11-08T02:42:13Z")

</div>

> [@namrathae02](#):
>
> we are having multiple components

Do you mean multiple clients? Other users are also simultaneously clicking the button because of the popup?

If not, `system.tag.writeBlocking` should lock the local gui and prevent any user inputs until the write operation has completed

---

<div class="post-metadata">

**Author:** ![karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@karthik](https://forum.inductiveautomation.com/u/karthik)\
**Post date:** [November 8, 2025, 6:00am UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/7 "2025-11-08T06:00:13Z")

</div>

The issue is that we have a button with a script that writes a tag along with a confirmation message (“Run” or “Stop”). The problem we observed is that when we click the button and select “Run,” it still allows us to click the same button again. Due to multiple clicks and the slow tag update, the message continues to display “Run,” whereas it should change to “Stop” once the value is updated.

We want to disable multiple clicks on this specific button until the “Run” request is fully executed. However, other buttons on the screen should remain clickable and function normally during this time.

As there are many similar buttons throughout the project, we are looking for a simple, global solution that can be applied across all components, rather than having to rework the script in each one individually.

---

<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:** [November 8, 2025, 2:08pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/8 "2025-11-08T14:08:02Z")

</div>

There's no magic wand, sorry. You will have to touch the script in every button. The script should disable the button to prevent re-clicks until confirmation comes back from the PLC.

I would also suggest you **not** try to display a pre-emptive status--let the actual status from the PLC drive that display.

If you move the common logic to a project library script, you will reduce the amount of correction per button, and will set yourself for easier future maintenance.

Slow response times suggest other problems--you should fix the slow response times.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [November 8, 2025, 10:57pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/9 "2025-11-08T22:57:08Z")

</div>

> [@karthik](#):
>
> a simple, global solution that can be applied across all components,

Templates are what I use for repetitive components, so I can make changes in one place instead of having to touch many instances of the same thing.

> [@karthik](#):
>
> and the slow tag update,

This sounds like a binding that doesn't immediately reflect the tag change. If so, you could try adding [system.db.refresh](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-db/system-db-refresh) to the script to immediately trigger the binding update after the tag write.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [November 10, 2025, 3:13pm UTC](https://forum.inductiveautomation.com/t/avoid-duplicate-confirmation-dialogs-during-tag-write-operation/111994/10 "2025-11-10T15:13:30Z")

</div>

Bind the run/stop button “state” to the tag that you’re trying to write. That way your “confirm” button is always accurate, even if the popup is opened before the write is completed.
