# Auto clear Confim message boxes?

**URL:** <https://forum.inductiveautomation.com/t/auto-clear-confim-message-boxes/14879>\
**Category:** Ignition\
**Created:** [July 25, 2017, 3:06pm UTC](https://forum.inductiveautomation.com/t/auto-clear-confim-message-boxes/14879 "2017-07-25T15:06:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.bath](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@david.bath](https://forum.inductiveautomation.com/u/david.bath)\
**Post date:** [July 25, 2017, 3:06pm UTC](https://forum.inductiveautomation.com/t/auto-clear-confim-message-boxes/14879/1 "2017-07-25T15:06:33Z")

</div>

The original developer has configured our system with multiple “popup” message boxes using the System.gui.confirm and system.gui.messagebox functions. This is OK for the Plant operators, but the “popups” hang around on all clients after being cleared/accepted by the Plant Operator. Is there any way to clear the “popups” from other clients once accepted by the on one client?  
Is it possible to limit the popups to certain clients - i.e. only the operator clients?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [July 25, 2017, 3:38pm UTC](https://forum.inductiveautomation.com/t/auto-clear-confim-message-boxes/14879/2 "2017-07-25T15:38:59Z")

</div>

You could check the host name and issue the confirm

```auto
if system.net.getHostName() in ['HostName1','HostName2','L5CG6111112DB']: 
	if system.gui.confirm(u'Are you sure?', 'Confirm'):
		value = 1
		event.source.parent.getComponent('CheckBox').selected = value

```

you could do it against a SQL table, text file, or hard coded list as above.

---

<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:** [July 26, 2017, 4:25pm UTC](https://forum.inductiveautomation.com/t/auto-clear-confim-message-boxes/14879/3 "2017-07-26T16:25:56Z")

</div>

> [@david.bath](#):
>
> Is there any way to clear the "popups" from other clients once accepted by the on one client?

No. You'll have to excise such calls to system.gui.confirm/messageBox and replace them with openWindow() calls that use a normal popup. Then you can broadcast messages from the client that clears the popup to the other clients to close them there. See system.util.sendMessage().
