# system.gui.warningBox

**URL:** <https://forum.inductiveautomation.com/t/system-gui-warningbox/103362>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [March 6, 2025, 10:22pm UTC](https://forum.inductiveautomation.com/t/system-gui-warningbox/103362 "2025-03-06T22:22:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reghardt\_Swanepoel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/reghardt_swanepoel/32/67825_2.png) [@Reghardt\_Swanepoel](https://forum.inductiveautomation.com/u/Reghardt_Swanepoel)\
**Post date:** [March 6, 2025, 10:22pm UTC](https://forum.inductiveautomation.com/t/system-gui-warningbox/103362/1 "2025-03-06T22:22:48Z")

</div>

Hi guys, I feel like this is going to be a stupid question but here goes nothing. In my project I want to make use of system.gui.confirm / errorBox / warningBox but I cannot for the life of me figure out how to implement it - maybe I am just missing something obvious. As a test I created a temp function that counts the amount of times someone tried to navigate to a page I am still working on a throws a message that the screen isn't available with a count of how many people tried. If I run the code in the designer/script editor I get the popup box as I want, then I copied the code to the gateway script library and if I call it from the script editor I get the popup. But if I try to paste the code in a button event script or call the gateway script from a button event I get the error that system.gui doesn't exist. Can someone please point me in the right direction.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/242e362e96ec10def92a8c9673eddfe95252432c.png)

EDIT:

```python
def screenNotReady(clicked):
	links = {
		'bereiding' : '[default]Project_Variables/ScreenNotDone/Bereiding',
		'silos' : '[default]Project_Variables/ScreenNotDone/Silos',
		'branderij' : '[default]Project_Variables/ScreenNotDone/Branderij',
		'molens' : '[default]Project_Variables/ScreenNotDone/Molens',
		'verpakkerij' : '[default]Project_Variables/ScreenNotDone/Verpakkerij',
		'logistiek' : '[default]Project_Variables/ScreenNotDone/Logistiek'
	}
	
	var = system.tag.read(links[clicked]).value
	var += 1
	message = "Congrats, you are the ###th person to try...\nNo this screen is still not ready!"
	message = message.replace('###', str(var))
	system.tag.write(links[clicked], var)
	system.gui.warningBox(message, "Oooooof")

```

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 6, 2025, 10:32pm UTC](https://forum.inductiveautomation.com/t/system-gui-warningbox/103362/2 "2025-03-06T22:32:05Z")

</div>

Post code, not pictures of code. It helps speed up the testing process as people can copy/paste instead of having to try to read a screenshot. Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831). You can edit your post by clicking on the pencil icon in the bottom right.

Moving on, you have this marked as perspective. `system.gui.warningBox` is vision only. (I personally recommend rolling your own info popup in vision as well)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [March 6, 2025, 10:32pm UTC](https://forum.inductiveautomation.com/t/system-gui-warningbox/103362/3 "2025-03-06T22:32:12Z")

</div>

System gui isn't available in a perspective scope. Only for vision.

You will have to roll your own.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [March 6, 2025, 10:55pm UTC](https://forum.inductiveautomation.com/t/system-gui-warningbox/103362/4 "2025-03-06T22:55:39Z")

</div>

Check out the exchange, there are a few resources there that may work for you,

> **[Ignition Exchange](https://inductiveautomation.com/exchange/93/overview)**
>
> Discover, share, and download community made Ignition resources in collaboration with your organization or the Ignition community.

> **[Ignition Exchange](https://inductiveautomation.com/exchange/142/overview)**
>
> Discover, share, and download community made Ignition resources in collaboration with your organization or the Ignition community.

---

<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:** [March 6, 2025, 11:01pm UTC](https://forum.inductiveautomation.com/t/system-gui-warningbox/103362/5 "2025-03-06T23:01:50Z")

</div>

Separately from the immediate issue (`system.gui` and `system.nav` should really be `system.vision` functions), some other things I notice in your script:

1. Tags are often not the right place to store user interface information, unless you truly do want _global_ storage of variables.
2. Use string.format, not replace for nicer to read and write string templating: [https://pyformat.info/](https://pyformat.info/)
3. Repeat yourself as little as feasible, e.g. your dictionary of `links` is essentailly just repeating keys -\> values with a static path prepended.

---

<div class="post-metadata">

**Author:** ![Reghardt\_Swanepoel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/reghardt_swanepoel/32/67825_2.png) [@Reghardt\_Swanepoel](https://forum.inductiveautomation.com/u/Reghardt_Swanepoel)\
**Post date:** [March 7, 2025, 7:40pm UTC](https://forum.inductiveautomation.com/t/system-gui-warningbox/103362/6 "2025-03-07T19:40:36Z")

</div>

Seems like something easy to miss that only Vision is supported. Makes sense why I couldn't get it to work.

Thank you for the reply, I will create my own.

Thank you for the other feedback PGriffith

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [March 8, 2025, 12:03am UTC](https://forum.inductiveautomation.com/t/system-gui-warningbox/103362/7 "2025-03-08T00:03:52Z")

</div>

The docs are very helpful, check them out.

 ![2025-03-07 19_02_13-system.gui.confirm _ Ignition User Manual](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/4/94f47ad6fa35702d09243d3e123e9248d88067a6.png)
