CriteriaEvaluator - Global
concept australia Updated Sep 10, 2026 1 min read c_CriteriaEvaluatorAPI.md
The CriteriaEvaluator script include provides methods to implement a general-purpose criteria evaluator.
The general use pattern is to construct the class, add as many criteria as needed, then evaluate.
Parent Topic:Server API reference
CriteriaEvaluator - addCriterion(String lhComparand, String operator, String rhComparand)
Adds the criteria to be evaluated.
| Name | Type | Description |
|---|---|---|
| lhComparand | String | The left hand comparand. Must be a named value in the left hand values input into evaluate(). |
| operator | String | The operator. Must be one of: equals, starts with, contains, does not contain, ends with, or regex matches. |
| rhComparand | String | The right hand comparand. Can be evaluated either as one of the right hand values input to evaluate() or as a literal string. |
| Type | Description |
|---|---|
| void |
CriteriaEvaluator - evaluate(Object lhValues, String rhValues, Boolean any)
Evaluates the criteria.
| Name | Type | Description |
|---|---|---|
| lhValues | Object | A hashmap of name-value pairs to evaluate the left hand comparands of the criteria. |
| rhValues | String | Optional right hand values to use instead of the literal value in evaluating the right hand comparands. |
| any | Boolean | If true, any criterion matching suffices for a true result. If false, all criteria must match for a true result. |
| Type | Description |
|---|---|
| Boolean | True if the supplied values satisfy the criteria, false otherwise. |
51 lines · 2.2 KB
--- title: CriteriaEvaluator - Global description: The CriteriaEvaluator script include provides methods to implement a general-purpose criteria evaluator.Adds the criteria to be evaluated.Evaluates the criteria. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/c\_CriteriaEvaluatorAPI.html release: australia product: Server API Reference classification: server-api-reference topic_type: concept last_updated: "2026-09-10" reading_time_minutes: 1 breadcrumb: [Server API reference, API reference, API implementation and reference] --- # CriteriaEvaluator- Global The CriteriaEvaluator script include provides methods to implement a general-purpose criteria evaluator. The general use pattern is to construct the class, add as many criteria as needed, then evaluate. **Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md) ## CriteriaEvaluator - addCriterion\(String lhComparand, String operator, String rhComparand\) Adds the criteria to be evaluated. |Name|Type|Description| |----|----|-----------| |lhComparand|String|The left hand comparand. Must be a named value in the left hand values input into evaluate\(\).| |operator|String|The operator. Must be one of: equals, starts with, contains, does not contain, ends with, or regex matches.| |rhComparand|String|The right hand comparand. Can be evaluated either as one of the right hand values input to evaluate\(\) or as a literal string.| |Type|Description| |----|-----------| |void| | ## CriteriaEvaluator - evaluate\(Object lhValues, String rhValues, Boolean any\) Evaluates the criteria. |Name|Type|Description| |----|----|-----------| |lhValues|Object|A hashmap of name-value pairs to evaluate the left hand comparands of the criteria.| |rhValues|String|Optional right hand values to use instead of the literal value in evaluating the right hand comparands.| |any|Boolean|If true, any criterion matching suffices for a true result. If false, all criteria must match for a true result.| |Type|Description| |----|-----------| |Boolean|True if the supplied values satisfy the criteria, false otherwise.|
| title | CriteriaEvaluator - Global |
| description | The CriteriaEvaluator script include provides methods to implement a general-purpose criteria evaluator.Adds the criteria to be evaluated.Evaluates the criteria. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/c\_CriteriaEvaluatorAPI.html |
| release | australia |
| product | Server API Reference |
| classification | server-api-reference |
| topic_type | concept |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | Server API referenceAPI referenceAPI implementation and reference |