Negative operators with advanced search
Using negative operators enables you to create filters that exclude devices instead of including them. For example, you can search for:
- Devices that use any platform other than iOS
- Devices with a current country code other than US
Operator |
Action |
Example |
Does not equal |
Returns a list of devices that do not match the criteria specified in the value field for the selected field. |
Select: •Home Country Name as the field •Does not equal in Operator •United States in Country Name The search returns a list of devices that do not have United States as their home country name. |
Does not contain |
Returns a list of devices that do not contain the string specified in the selected field. •Used only with strings. •Available only in the expression field. |
Select or enter: •Go to Common Fields and select Device Space. •In the expression field, enter: •Place the cursor between the two quote marks in the expression field and enter: The search returns a list of devices that are not assigned to the Global space. |
Examples for advanced search with negative operators
To display a list of devices that have countries other than the United States as the assigned home country, create an advanced search expression that provides the necessary information.
- Go to Device & Users > Devices.
- Click the large magnifying glass icon located at the top right to initiate an advanced search.
- In Field, select Common Fields.
- Select Home Country Name.
- Select Does not equal from the list in Operator.
- Select United States from the list of countries in Country Name.
- Click Search.
- Optional: To save the search to a label, click Save to Label and then provide an existing label name or a new label name and description.
- If Notes for Audit Logs is enabled, a text dialog box opens. Enter the reason for the change and then click Confirm. For more information, see Best practices: label management.
Suppose you want to list users within an LDAP group that have a Home Country Code other than the United States (US).
To create the advanced search expression that provides the needed list:
- Go to Device & Users > Devices
- Click the large magnifying glass icon located at the top right to initiate an advanced search.
-
In the expression field enter the following, including quote marks:
“user.ldap.groups.name” = “Corp_Users” AND “common.home_country_code” != “US”
- Click Search.
- Optional: To save the search to a label, click Save to Label and then provide a new label name and description.
- If Notes for Audit Logs is enabled, a text dialog box opens. Enter the reason for the change and then click Confirm. For more information, see Best practices: label management.