Skip to content
37 changes: 37 additions & 0 deletions docs/segments/manage_segments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,43 @@ Once you've selected a date field as your filter, such as the default **Date las

Once you have selected the field you can then choose the type of operation to perform. These vary depending on the way you wish to filter your Contacts.

Operators for select fields
===========================

Single-select fields, such as Country, Timezone, Region, Locale, and custom select fields, offer these operators:
Comment thread
adiati98 marked this conversation as resolved.
Comment thread
adiati98 marked this conversation as resolved.

.. vale off

* **Is equal to** - The Contact's value exactly matches the selected option.
* **Is not equal to** - The Contact's value doesn't match the selected option.
* **Is empty** - The Contact has no value for this field.
* **Is not empty** - The Contact has a value for this field.
* **Matches pattern** - The Contact's value matches the specified regular expression pattern.
* **Does not match pattern** - The Contact's value doesn't match the specified regular expression pattern.
* **Includes any of** - The Contact's value matches at least one of the selected options.
* **Excludes any of** - The Contact's value matches none of the selected options.
Comment thread
adiati98 marked this conversation as resolved.

.. vale on

A multiselect field can hold more than one value at once, so it offers a different set of operators:
Comment thread
adiati98 marked this conversation as resolved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/aside @mautic/core-team can anyone help me to understand what is this multiselect field? Considering the previous explanation about single select field:

Single-select fields, such as Country, Timezone, Region, Locale, and custom select fields, ...

in my understanding, then the rest are multiselect fields. Looking at the UI (see the attached image below), we have more than 6 fields that are listed here. Or maybe I'm looking at the wrong thing?

I want to make sure before we merge this PR. TIA! ✨

Image


Comment thread
adiati98 marked this conversation as resolved.
.. vale off

* **Includes any of** - The Contact's values include at least one of the selected options.
* **Excludes any of** - The Contact's values include none of the selected options.
* **Includes all of** - The Contact's values include every selected option.
* **Excludes all of** - The Contact's values don't include every selected option.
* **Is empty** - The Contact has no value for this field.
* **Is not empty** - The Contact has a value for this field.

The two sets aren't identical. A multiselect field doesn't offer **Is equal to**, **Is not equal to**, **Matches pattern**, or **Does not match pattern**, since those compare against a single value. Instead, it adds **Includes all of** and **Excludes all of** to match against every selected value.
Comment thread
adiati98 marked this conversation as resolved.

.. vale on

.. note::

The ``Includes all of`` and ``Excludes all of`` operators appear only for multiselect fields, since they require a Contact to hold more than one value. Single-select fields, such as Country, Timezone, Region, and Locale, hold only a single value, so these operators don't apply.

.. vale off

Matching part of a string
Expand Down
Loading