# System.util.getSessionInfo() unable to filter by project

**URL:** <https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762>\
**Category:** Ignition\
**Created:** [March 3, 2020, 2:22pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762 "2020-03-03T14:22:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 3, 2020, 2:22pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/1 "2020-03-03T14:22:37Z")

</div>

7.9.13, No matter what I try I cannot get the project filter to work. The manual says that you can filter by user and by project. Here is what I’ve tried:

```auto
system.util.getSessionInfo('','SewingStation')
system.util.getSessionInfo('SewingStation')
system.util.getSessionInfo(['SewingStation'])
system.util.getSessionInfo([['SewingStation']])
system.util.getSessionInfo(['*'],['SewingStation'])

```

The user filter works like `…('Username')`, not sure why project filter does not work the same

---

<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:** [March 3, 2020, 2:45pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/2 "2020-03-03T14:45:25Z")

</div>

I vaguely recall a bug report about that…

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 3, 2020, 2:46pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/3 "2020-03-03T14:46:54Z")

</div>

I thought it might be a bug seeing as it should be pretty simple to use. Thanks.

---

<div class="post-metadata">

**Author:** ![bpreston](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bpreston](https://forum.inductiveautomation.com/u/bpreston)\
**Post date:** [March 3, 2020, 2:53pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/4 "2020-03-03T14:53:22Z")

</div>

Have you tried:

```auto
system.util.getSessionInfo(None,'SewingStation')

```

When I try it then it filters the way I believe your wanting it to. It wants something in the user filter but None/Null appears to get it to skip it and just allow the project filter to work.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 3, 2020, 2:57pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/5 "2020-03-03T14:57:15Z")

</div>

That does seem to work and should definitely be in the manual. Not very intuitive to me considering the way other scripting functions work with multiple parameter options. Thanks

---

<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:** [March 3, 2020, 3:46pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/6 "2020-03-03T15:46:56Z")

</div>

`system.util.getSessionInfo(projectFilter='SewingStation')` should also do the same thing.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 3, 2020, 4:18pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/7 "2020-03-03T16:18:18Z")

</div>

Your comment just reminded me that I had the same problem with `system.util.sendMessage()`. It was easier to handle by decalring the parameter explicitly. I will note that when using anything in the `system.util` family

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 3, 2020, 4:28pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/8 "2020-03-03T16:28:00Z")

</div>

You should just do that whenever there are optional arguments - it will take all of the mystery out of why something might not be working as intended.

---

<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:** [March 3, 2020, 4:29pm UTC](https://forum.inductiveautomation.com/t/system-util-getsessioninfo-unable-to-filter-by-project/32762/9 "2020-03-03T16:29:30Z")

</div>

Yeah, we’re not very consistent about it on methods with only a few parameters, but generally any method that takes more than three parameters should accept keyword arguments, which makes the calling syntax a lot cleaner. Over time we’re (I’m 🙂 ) pushing to make all of our first-party scripting functions accept keyword arguments so they’re better at pretending to be Python functions.
