Use of 'matches' and 'in set' in filters?

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK

Use of 'matches' and 'in set' in filters?

Post by MJN »

Hi all,

Previously I have been using 'equal to' in my filters to target a specific camera, however now I would like to match one of any number of cameras and so figure that 'matches' or 'in set' would suit my needs?

Can someone give me an example of how I would do this? For example, let's say I have 5 cameras and I want to match either number 2 or 4.

Many thanks,

Mathew
User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK

Post by MJN »

Sussed it out through experimentation and thought I'd post in case anyone else has a similar query.

The 'in set' allows you to give a comma-separated list (set) whereby a match of any value will trigger (subject to any other required conditions being met). For example, using Monitor IDs, the set 2,4 will provide a match for either camera 2 or 4. Similarly, using Monitor Names, the set catflap,landing would match either of those cameras. Conversely, 'not in set' is the opposite and will be true only if the ID/name doesn't appear in the list (set).

The 'match' function is more applicable to string-based values such as Monitor Names and allows what is effectively a search string to be entered. For example the value 'cat' would match my 'catflap' camera, whereas 'house' would match my 'Front_of_house' and 'Rear_of_house' cameras.

Mathew
Locked