# Prompt User Input On Gateway Event Update

**URL:** <https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834>\
**Category:** Ignition\
**Tags:** ignition81, scripting, vision\
**Created:** [December 7, 2021, 1:46pm UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834 "2021-12-07T13:46:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.morris](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@chris.morris](https://forum.inductiveautomation.com/u/chris.morris)\
**Post date:** [December 7, 2021, 1:46pm UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834/1 "2021-12-07T13:46:04Z")

</div>

After much work I have finally made Ignition commit and push to a Git origin repo by using the “Update” gateway event script and calling a bat file to handle all of the logic. Running Windows Server 2019 and Ignition 8.1.1.

The problem I have now is that every commit is a generic message hard coded into the bat file with a timestamp for when the bat file is ran.

What I would like to do is have the update event prompt the user for input and pass that input as an argument to my bat file and use that as the commit message.

Since it is gateway scope and not client scope system.gui.inputBox doesn’t work. I could have it read a tag and write the commit message to the tag, but there is no way to force someone to enter something into that tag through client event scripts (only runs on time, shut down, shutdown-intercept, or an interval). I could maybe do on keystroke and hope everyone uses ctrl + s but that leaves a pretty large gap and I don’t know that the timing would always work out that the keystroke intercept happens before the gateway update event.

Anyone have any creative ideas on how to prompt the user for input when saving the project to get a custom git commit message?

---

<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:** [December 7, 2021, 2:48pm UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834/2 "2021-12-07T14:48:31Z")

</div>

Gateway execution is headless. Sorry. You’d need a module loaded into the designer that could intercept the save operation and gather the info _ **before** _ the save goes to the gateway.

Assuming it is even possible to intercept the save operation.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 7, 2021, 3:16pm UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834/3 "2021-12-07T15:16:23Z")

</div>

Seems tricky to do…  
maybe one could alter the whole menu and keybinding to trigger your own “save” events that first opens a popup…

Ive seen someone change the rightclick context menu on project browser before so im guessing the main menu would also be possible. Welh he tried to change it alteast i think in the end he didnt have to, but idk if it was possible at all  
?[MenuBarMerge](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.0/com/inductiveautomation/ignition/designer/model/menu/MenuBarMerge.html)

yeah it probaly somethin here in the doc it says “Represents a menu merge for a JMenu. This may be a **top-level menu (like “file”)** or a sub-menu”  
[https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.0/com/inductiveautomation/ignition/designer/model/menu/JMenuMerge.html](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.0/com/inductiveautomation/ignition/designer/model/menu/JMenuMerge.html)  
and file is exactly the one you would want to change

---

<div class="post-metadata">

**Author:** ![gnguyen](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gnguyen](https://forum.inductiveautomation.com/u/gnguyen)\
**Post date:** [December 8, 2021, 12:43pm UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834/4 "2021-12-08T12:43:19Z")

</div>

Hi,

I know someone who has build a simple module to handle this. You can then sign in your repo, select wether export project, tags, gw bkup. I’ll ask him if he can share it…

---

<div class="post-metadata">

**Author:** ![isabellapitco](https://avatars.discourse-cdn.com/v4/letter/i/ebca7d/32.png) [@isabellapitco](https://forum.inductiveautomation.com/u/isabellapitco)\
**Post date:** [April 26, 2022, 5:59pm UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834/5 "2022-04-26T17:59:55Z")

</div>

Hi gnguyen,

Any chance you could share more about this module with me?

---

<div class="post-metadata">

**Author:** ![gnguyen](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gnguyen](https://forum.inductiveautomation.com/u/gnguyen)\
**Post date:** [April 27, 2022, 6:41am UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834/6 "2022-04-27T06:41:04Z")

</div>

Sure… @mazeyrat may be of some help here.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 29, 2022, 7:47am UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834/7 "2022-04-29T07:47:49Z")

</div>

Yes @gnguyen @isabellapitco we have a module to control some **git action** from **vision or perspective**.  
(best with **Ignition 8.1.16** which enable to manage **one repository per project** )

You can test the module:  
[BYES-Git-signed-1.8.0.modl](https://forum.inductiveautomation.com/uploads/short-url/oFJEE0gQ2aEvsYGUnqEnmWpkLgB.modl) (3.1 MB)

In our use case we track with git the projects changes, we have another module to add script functions in order to export gateway ressources (images, tags.json, sqlite config table, modules versions and few critical files: ignition.conf and redundancy.xml) in **another git repo “export\_gateway” for gateway ressources.**

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/8/08519fdb23eeb40c4730f252b76b4031acfb578a.png)

Example of popup:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/6/d6fc1cc1c2105c72c38e77113bbcc180cbc3e02d.png)

Hope this help.

---

<div class="post-metadata">

**Author:** ![gnguyen](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gnguyen](https://forum.inductiveautomation.com/u/gnguyen)\
**Post date:** [April 29, 2022, 8:55am UTC](https://forum.inductiveautomation.com/t/prompt-user-input-on-gateway-event-update/53834/8 "2022-04-29T08:55:44Z")

</div>

Thank you @mazeyrat for sharing this. Awesome, as usual!
