# system.util.getSystemFlags() in Gateway Tag Change Event?

**URL:** <https://forum.inductiveautomation.com/t/system-util-getsystemflags-in-gateway-tag-change-event/7772>\
**Category:** Ignition\
**Created:** [December 30, 2013, 10:10pm UTC](https://forum.inductiveautomation.com/t/system-util-getsystemflags-in-gateway-tag-change-event/7772 "2013-12-30T22:10:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamaustin](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adamaustin](https://forum.inductiveautomation.com/u/adamaustin)\
**Post date:** [December 30, 2013, 10:10pm UTC](https://forum.inductiveautomation.com/t/system-util-getsystemflags-in-gateway-tag-change-event/7772/1 "2013-12-30T22:10:43Z")

</div>

I’m getting the following error when executing this code in a Gateway Tag Change event script:

```auto
sf = system.util.getSystemFlags()
```

Using Ignition 7.5.11 (b1526)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 30, 2013, 10:16pm UTC](https://forum.inductiveautomation.com/t/system-util-getsystemflags-in-gateway-tag-change-event/7772/2 "2013-12-30T22:16:32Z")

</div>

getSystemFlags() is a client-scoped function, you can’t use it in any gateway-scoped scripts.

What are you trying to accomplish?

---

<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:** [December 30, 2013, 10:22pm UTC](https://forum.inductiveautomation.com/t/system-util-getsystemflags-in-gateway-tag-change-event/7772/3 "2013-12-30T22:22:10Z")

</div>

The function system.util.getSystemFlags() doesn’t exist in Gateway Scripts.

The system.util.getSystemFlags() function provides information about clients and designers and so doesn’t have a use in a Gateway Script.

---

<div class="post-metadata">

**Author:** ![adamaustin](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adamaustin](https://forum.inductiveautomation.com/u/adamaustin)\
**Post date:** [December 30, 2013, 10:49pm UTC](https://forum.inductiveautomation.com/t/system-util-getsystemflags-in-gateway-tag-change-event/7772/4 "2013-12-30T22:49:38Z")

</div>

Yes, I see my flaw in thinking now. I was trying to implement [Nick’s suggestion from a previous post](http://www.inductiveautomation.com/forum/viewtopic.php?f=70&t=11564) except that my code is in a Gateway Timer event. My timer is checking a web service every minute and updating SQLTags or adding new ones based on the values it receives from the service.

I’ve run into a problem where, if I want to enable the Historian for the newly created tags (using the [IA Scripting module](http://www.inductiveautomation.com/forum/viewtopic.php?f=88&t=8823)), I will need to specify the PrimaryHistoryProvider.

I was hoping if I left it out of the attributes or set it to the empty string, it would use the Default Database Provider for the project… but I think I read in a previous post (sorry no link to that one) that SQLTags are global in scope to all projects, so it makes sense that you will have to specify the Historian DB.

I think I’ll just add that to the list of user configuration tags.
