# Get System Name in Client

**URL:** <https://forum.inductiveautomation.com/t/get-system-name-in-client/12425>\
**Category:** 3rd Party Modules\
**Created:** [December 2, 2016, 10:46pm UTC](https://forum.inductiveautomation.com/t/get-system-name-in-client/12425 "2016-12-02T22:46:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [December 2, 2016, 10:46pm UTC](https://forum.inductiveautomation.com/t/get-system-name-in-client/12425/1 "2016-12-02T22:46:37Z")

</div>

What’s the best way to get the system name from the client? At the moment I’m doing an RPC request to the gateway and looking it up in the SystemPropertiesRecord from the internal DB.

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [December 16, 2016, 12:53pm UTC](https://forum.inductiveautomation.com/t/get-system-name-in-client/12425/2 "2016-12-16T12:53:37Z")

</div>

I assume you mean “Gateway Name”? I am interested as well. I have used [System]Client/Network/GatewayAddress tag before, but that is not very reliable and can change over time in our environment.

Other way is scripting (I rely on this), but again, address not name and changes based on scope…

```auto
try:
	gateway = system.util.getGatewayAddress().lower()
except AttributeError:
	gateway = system.net.getHostName().lower()
```

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [December 16, 2016, 11:27pm UTC](https://forum.inductiveautomation.com/t/get-system-name-in-client/12425/3 "2016-12-16T23:27:48Z")

</div>

na this would be the system name under the gateway settings page. It doesn’t always quite match the computers host name.

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [September 22, 2017, 12:56am UTC](https://forum.inductiveautomation.com/t/get-system-name-in-client/12425/4 "2017-09-22T00:56:35Z")

</div>

@KathyApplebaum mentioned to me at ICC that a script function for this is in the works! Hopefully 7.9.5.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [September 22, 2017, 5:50am UTC](https://forum.inductiveautomation.com/t/get-system-name-in-client/12425/5 "2017-09-22T05:50:36Z")

</div>

Put the following in a function

```auto
from com.inductiveautomation.ignition.gateway import SRContext
context = SRContext.get()
return context.getSystemProperties().getSystemName()

```

Put this into an expression tag

```auto
runScript("the.script.without.parentheses",0)

```

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 22, 2017, 1:36pm UTC](https://forum.inductiveautomation.com/t/get-system-name-in-client/12425/6 "2017-09-22T13:36:46Z")

</div>

Thanks for the reminder to check in to that. A system tag for the Gateway name has indeed been added to 7.9.5. 👍
