# Managing client window access

**URL:** <https://forum.inductiveautomation.com/t/managing-client-window-access/8285>\
**Category:** Ignition\
**Created:** [April 9, 2014, 2:47pm UTC](https://forum.inductiveautomation.com/t/managing-client-window-access/8285 "2014-04-09T14:47:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jose.granero](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jose.granero/32/11190_2.png) [@jose.granero](https://forum.inductiveautomation.com/u/jose.granero)\
**Post date:** [April 9, 2014, 2:47pm UTC](https://forum.inductiveautomation.com/t/managing-client-window-access/8285/1 "2014-04-09T14:47:02Z")

</div>

I want to prevent the simultaneous access of different clients to a window, what’s the best way to do it?.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [April 9, 2014, 3:07pm UTC](https://forum.inductiveautomation.com/t/managing-client-window-access/8285/2 "2014-04-09T15:07:37Z")

</div>

When a user opens the window store in the database the fact that the window has been opened by that user and the client.

Before opening the window check the database to see if a different client already has it open.

When closing the window update the database with the information that the window has been closed.

Use system.util.getClientId() to distinguish between different clients.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [April 9, 2014, 3:27pm UTC](https://forum.inductiveautomation.com/t/managing-client-window-access/8285/3 "2014-04-09T15:27:03Z")

</div>

Instead of using the database the same thing could be done by storing a client ID to a memory tag. When the window is opened write the client ID of the client to the memory tag. Don’t let any other client open the window as long as a client ID exists in the memory tag. When the window is closed clear the memory tag.

The memory tag method seems a little easier to implement.

---

<div class="post-metadata">

**Author:** ![jose.granero](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jose.granero/32/11190_2.png) [@jose.granero](https://forum.inductiveautomation.com/u/jose.granero)\
**Post date:** [April 10, 2014, 8:08am UTC](https://forum.inductiveautomation.com/t/managing-client-window-access/8285/4 "2014-04-10T08:08:02Z")

</div>

Thank you for both ideas.
