# System.groups missing?

**URL:** <https://forum.inductiveautomation.com/t/system-groups-missing/81430>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 2, 2023, 11:09pm UTC](https://forum.inductiveautomation.com/t/system-groups-missing/81430 "2023-11-02T23:09:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![glennr](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@glennr](https://forum.inductiveautomation.com/u/glennr)\
**Post date:** [November 2, 2023, 11:09pm UTC](https://forum.inductiveautomation.com/t/system-groups-missing/81430/1 "2023-11-02T23:09:24Z")

</div>

I'm wanting to using system.groups.loadFromFile() but system.groups seem to be missing from my installation (8.1.32).

In the script console of Ignition Designer:

```auto
>>> import system.groups
Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: No module named groups
>>> import system
>>> import system.util
>>> dir(system)
[' __class__', ' __delattr__', ' __dict__', ' __doc__', ' __ensure_finalizer__', 
' __findattr_ex__', ' __finditem__', ' __format__', ' __getattribute__', ' __hash__', 
' __init__', ' __name__', ' __new__', ' __reduce__', ' __reduce_ex__', ' __repr__', 
' __setattr__', ' __setitem__', ' __str__', ' __subclasshook__', 'alarm', 'alert', 'clear', 
'dataset', 'date', 'db', 'device', 'dict', 'dnp3', 'file', 'getDict', 'getName', 'gui', 
'math', 'name', 'nav', 'net', 'opc', 'print', 'project', 'report', 'security', 'serial', 
'setDict', 'setName', 'sfc', 'system', 'tag', 'toString', 'user', 'util', 'vision']

```

How do I get system.groups?

---

<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:** [November 2, 2023, 11:18pm UTC](https://forum.inductiveautomation.com/t/system-groups-missing/81430/2 "2023-11-02T23:18:29Z")

</div>

Ignition designer scope behaves like a modified vision scope, so since `system.groups` only exists in gateway/perspective scopes, you won't be able to call it directly from the designer.

Try putting your script into a project library function, and then call the script via a gateway message handler. Call the handler from the designer script console.

---

<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:** [November 2, 2023, 11:29pm UTC](https://forum.inductiveautomation.com/t/system-groups-missing/81430/3 "2023-11-02T23:29:52Z")

</div>

Also, though this is hopefully implied, you must have the SQL Bridge module installed for transaction groups to exist 🙂

But the core issue is scoping as @ryan.white identified.

---

<div class="post-metadata">

**Author:** ![glennr](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@glennr](https://forum.inductiveautomation.com/u/glennr)\
**Post date:** [November 3, 2023, 1:33am UTC](https://forum.inductiveautomation.com/t/system-groups-missing/81430/4 "2023-11-03T01:33:43Z")

</div>

Thanks for the clarification of the scope. I have that part of it working now.

However when I call system.groups.loadFromFile(filename, prog, mode) I'm getting:  
`java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Invalid file format specified.`

The xml file I'm using was created using a transactionGroup exported XML file as a template. My script is saving the xml to a file in the current working dir, which appears in /usr/local/bin/ignition/ and then passing that filename to loadFromFile(). If I import that file manually in the designer then the import succeeds.

Is there any way to get more information about what the specific error is?

---

<div class="post-metadata">

**Author:** ![glennr](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@glennr](https://forum.inductiveautomation.com/u/glennr)\
**Post date:** [November 4, 2023, 1:30am UTC](https://forum.inductiveautomation.com/t/system-groups-missing/81430/5 "2023-11-04T01:30:12Z")

</div>

> [@glennr](#):
>
> Invalid file format specified.

This is because the file needs to be named [something].xml

---

<div class="post-metadata">

**Author:** ![glennr](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@glennr](https://forum.inductiveautomation.com/u/glennr)\
**Post date:** [November 4, 2023, 1:37am UTC](https://forum.inductiveautomation.com/t/system-groups-missing/81430/6 "2023-11-04T01:37:55Z")

</div>

Now it's giving warning: Columns missing from table, and 'create table' option is not enabled. Missing columns: [...].  
The documentation at [system.groups.loadFromFile](https://docs.inductiveautomation.com/display/DOC81/system.groups.loadFromFile) doesn't mention any parameters related to table creation. I see from other posts that there is a check box in the UI for "create table" but I have no idea how this would be accessed from a script.  
The xml I'm using is able to be successfully imported from the designer UI (right click on Transaction Groups-\>import-\>from XML)

How do I get this to work?

---

<div class="post-metadata">

**Author:** ![glennr](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@glennr](https://forum.inductiveautomation.com/u/glennr)\
**Post date:** [November 7, 2023, 11:04pm UTC](https://forum.inductiveautomation.com/t/system-groups-missing/81430/7 "2023-11-07T23:04:13Z")

</div>

Is there any other guidance available about how to diagnose this issue?
