# Is system.opc.getServers() only supposed to return enabled connections?

**URL:** <https://forum.inductiveautomation.com/t/is-system-opc-getservers-only-supposed-to-return-enabled-connections/39493>\
**Category:** Ignition\
**Created:** [October 8, 2020, 12:31pm UTC](https://forum.inductiveautomation.com/t/is-system-opc-getservers-only-supposed-to-return-enabled-connections/39493 "2020-10-08T12:31:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam.todorski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/adam.todorski/32/19388_2.png) [@adam.todorski](https://forum.inductiveautomation.com/u/adam.todorski)\
**Post date:** [October 8, 2020, 12:31pm UTC](https://forum.inductiveautomation.com/t/is-system-opc-getservers-only-supposed-to-return-enabled-connections/39493/1 "2020-10-08T12:31:17Z")

</div>

I’m using system.opc.getServers() to get a list of the OPC connections configured on a gateway so that an operator can enable or disable individual connections from a perspective UI, but when a connection is disabled the scripting function no longer returns that connection in the list. The documentation doesn’t say anything about the connection state, only that all servers are returned. Is this the expected behavior?

---

<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:** [October 8, 2020, 12:33pm UTC](https://forum.inductiveautomation.com/t/is-system-opc-getservers-only-supposed-to-return-enabled-connections/39493/2 "2020-10-08T12:33:15Z")

</div>

It’s written that way, seemingly intentional for whatever reason, but is inconsistent depending on what scope it’s called from. This was discussed here previously: [[bug-10419]system.opc.getServers() returns different results Perspective v.s. Vision](http://forum.inductiveautomation.com/t/bug-10419-system-opc-getservers-returns-different-results-perspective-v-s-vision/30663/4)

It doesn’t look like there’s been any movement towards changing this yet.

---

<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:** [October 8, 2020, 12:34pm UTC](https://forum.inductiveautomation.com/t/is-system-opc-getservers-only-supposed-to-return-enabled-connections/39493/3 "2020-10-08T12:34:49Z")

</div>

Hmm, after a closer look, it seems that parameter was implemented and released in 8.0.14.

---

<div class="post-metadata">

**Author:** ![adam.todorski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/adam.todorski/32/19388_2.png) [@adam.todorski](https://forum.inductiveautomation.com/u/adam.todorski)\
**Post date:** [October 8, 2020, 1:00pm UTC](https://forum.inductiveautomation.com/t/is-system-opc-getservers-only-supposed-to-return-enabled-connections/39493/4 "2020-10-08T13:00:16Z")

</div>

Thanks for the quick reply! I had not seen the other thread, could you please add the includeDisabled parameter to the manual page for this function? That would have saved me a lot of head scratching.

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [October 8, 2020, 4:15pm UTC](https://forum.inductiveautomation.com/t/is-system-opc-getservers-only-supposed-to-return-enabled-connections/39493/5 "2020-10-08T16:15:03Z")

</div>

> [@adam.todorski](#):
>
> could you please add the includeDisabled parameter to the manual page for this function?

Sorry about that. Looks like the docs missed the parameter due to some shenanigans. The parameter is listed on the page now.
