# triggeringItem in rule

**URL:** <https://community.openhab.org/t/triggeringitem-in-rule/58387>\
**Category:** Scripts & Rules\
**Created:** [November 30, 2018, 8:31pm UTC](https://community.openhab.org/t/triggeringitem-in-rule/58387 "2018-11-30T20:31:16Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![scottk](https://community.openhab.org/user_avatar/community.openhab.org/scottk/32/26059_2.png) [@scottk](https://community.openhab.org/u/scottk)\
**Post date:** [November 30, 2018, 10:41pm UTC](https://community.openhab.org/t/triggeringitem-in-rule/58387/6 "2018-11-30T22:41:11Z")

</div>

That explanation helped a lot! Now I have a much better notion of what you are trying to accomplish.

In words, what your rule should do to determine which windows are open, is filter the members of your `Windows` group item to build a set of all open windows. This technique and others are discussed at length in @rlkoshak’s _Design Pattern: Working with Groups in Rules_ post:

> [@Design Pattern: Working with Groups in Rules](https://community.openhab.org/t/design-pattern-working-with-groups-in-rules/20512):
>
> Edit: Updates for OH 4, inclusion of JS Scripting and Blockly examples, removed the doors example as it’s superfluous. Please see [Design Pattern: What is a Design Pattern and How Do I Use Them](https://community.openhab.org/t/design-pattern-what-is-a-design-pattern-and-how-do-i-use-them/40319) for how to read and use DPs. Problem Statement One powerful way to consolidate code in rules is to use array/list manipulation operations on the members of a Group. For example, filter down to just those members that are ON, get a list of the labels of those Items that are NULL, etc. Concept T…

---

_[View the full topic](https://community.openhab.org/t/triggeringitem-in-rule/58387)._
