Evaluator Rule Examples and Concepts
Evaluator rules in ManagementStudio ESM Plans allow you to assess objects using field values, readiness metrics, Active Directory (AD) group membership, and custom logic. The examples below illustrate common rule definitions and patterns, demonstrating how rule sets can be constructed to meet various workflow requirements.
Rules can be combined using logical operators such as -and and -or, with grouping available via parentheses ( ) for complex condition evaluation.
To optimise both performance and accuracy, restrict each ESM Plan to a relevant data set, ensuring rules apply only to pertinent objects.
Publish Events can be triggered by rule outcomes, automating processes and reducing manual intervention.
TABLE OF CONTENTS
- Evaluator Rule Examples and Concepts
- Date Calculation Rules
- Detail Field History Rules
- Cross Module Rules
- AD Group Rules
- Check Box List Rules
- Readiness Examples
- Readiness More Details
- Partial Text Matching – Like
- Regex Plan Rule
- Using the [Blank] Keyword
Date Calculation Rules
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| Has a date set | Field | DeployUnitSlotStart | != | [Blank] |
| Has no date set | Field | DeployUnitSlotStart | == | [Blank] |
| More than 10 days to go (Inclusive) | Field | DeployUnitSlotStart | >= | [Today + 10] |
| Less than 10 days to go (Inclusive) | Field | DeployUnitSlotStart | <= | [Today + 10] |
| More than 10 days ago (Inclusive) | Field | DeployUnitSlotStart | >= | [Today - 10] |
| Less than 10 days ago (Inclusive) | Field | DeployUnitSlotStart | <= | [Today - 10] |
| In the future | Field | DeployUnitSlotStart | > | [TimeStamp] |
| In the past | Field | DeployUnitSlotStart | < | [TimeStamp] |
| Older Than This Time Yesterday | Field | DeployUnitSlotStart | < | [Timestamp -1] |
| Is Between 5 & 10 Days to go | Field | DeployUnitSlotStart | Is the Day | Between [Today + 5] & [Today + 10] |
| Not Between 5 & 10 Days to go | Field | DeployUnitSlotStart | Not the Day | Between [Today + 5] & [Today + 10] |
| Is Between 5 & 10 Days ago | Field | DeployUnitSlotStart | Is the Day | Between [Today - 5] & [Today - 10] |
| Not Between 5 & 10 Days ago | Field | DeployUnitSlotStart | Not the Day | Between [Today - 5] & [Today - 10] |
| Three days to go between 1pm & 7pm | Field | DeployUnitSlotStart | Is the Day | Between [Today + 3 @13:00] & [Today + 3 @19:00] |
| Three days ago between 1pm & 7pm | Field | DeployUnitSlotStart | Is the Day | Between [Today - 3 @13:00] & [Today - 3 @19:00] |
| DeployUnitStart = 2021-01-25 | Field | DeployUnitSlotStart | Is the Day | 2021-01-25 |
| Compare two dates | Compare Fields | DeployUnitSlotStart | <= | DU:EndDate |
Explanations
- Has a date set: Passes if the field contains any value.
- Has no date set: Passes if the field is empty.
- More than 10 days to go (Inclusive): True if the date is at least 10 days in the future.
- Less than 10 days to go (Inclusive): True if the date is within the next 10 days.
- More than 10 days ago (Inclusive): True if the date is at least 10 days in the past.
- Less than 10 days ago (Inclusive): True if the date is within the last 10 days.
- In the future: The field date is after the current timestamp.
- In the past: The field date is before the current timestamp.
- Older Than This Time Yesterday: The field date is before the same time on the previous day.
- Is Between 5 & 10 Days to go: The field date is between 5 and 10 days ahead.
- Not Between 5 & 10 Days to go: The field date is outside 5 to 10 days ahead.
- Is Between 5 & 10 Days ago: The field date is between 5 and 10 days ago.
- Not Between 5 & 10 Days ago: The field date is not between 5 and 10 days ago.
- Three days to go between 1pm & 7pm: The field date is exactly 3 days ahead, between 13:00–19:00.
- Three days ago between 1pm & 7pm: The field date is exactly 3 days ago, between 13:00–19:00.
- DeployUnitStart = 2021-01-25: Passes if the date matches 2021-01-25.
- Compare two dates: Passes if
DeployUnitSlotStartis earlier than or equal toDU:EndDate.
Detail Field History Rules
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| Before 5 days ago | Field | IsArchived_Modified_Date | < | [Today -5] |
| Modified By Admin | Field | IsArchived_Modified_By | Like | Admin |
| Previous Value | Field | IsArchived_Modified_Value | Like | False |
Explanations
- Before 5 days ago: The record was modified more than five days ago.
- Modified By Admin: The record was modified by a user whose name includes "Admin".
- Previous Value: The previous value of the field contained "False".
Cross Module Rules
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| Apps Check | Field | AP:Title | Like | App #33038: Adobe Reader and Acrobat |
| Machine Check | Field | DV:Processor | Like | 3.4 GHz |
| DeploymentUnit Check | Field | DU:ShortLocation | Like | Nuneaton |
| MailBox Check | Field | MB:MailName1 | Like | TeamMailBox1 |
| Bespoke Check | Field | BK:BespokeName1 | Like | MyBespoke |
Explanations
- Apps Check: Passes if the application title contains “App #33038: Adobe Reader and Acrobat”.
- Machine Check: Passes if the processor field contains “3.4 GHz”.
- DeploymentUnit Check: Passes if the short location is “Nuneaton”.
- MailBox Check: Passes if the mailbox name is “TeamMailBox1”.
- Bespoke Check: Passes if the bespoke name field contains “MyBespoke”.
AD Group Rules
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| Is a CCTV recoding PC | AD Group | DC=Enterprise,DC=Local | Is In | Global_CCTV_Devices |
| Is not a Factory PC | AD Group | DC=Corp,DC=Local | Is Not In | Global_Factory_Devices |
Explanations
- Is a CCTV recoding PC: Passes if the device is a member of the
Global_CCTV_Devicesgroup within the Enterprise domain. - Is not a Factory PC: Passes if the device is not a member of the
Global_Factory_Devicesgroup within the Corp domain.
Check Box List Rules
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| Ben is Checked | Field | UMCT1\Tab 1\Check ME | Like | Ben |
| Dave is Checked | Field | UMCT1\Tab 1\Check ME | Like | Dave |
Explanations
- Ben is Checked: Passes if “Ben” is present in the
Check MEfield. - Dave is Checked: Passes if “Dave” is present in the
Check MEfield.
Example Logic
- OR logic:
[Ben is Checked] -or [Dave is Checked]— Passes if either value is collected. - AND logic:
[Ben is Checked] -and [Dave is Checked]— Passes if both are checked. - Grouped evaluation:
([Ben is Checked] -or [Dave is Checked]) -and [Some Other Rule]
| Example Name | Logic Expression |
|---|---|
| Basic OR | [Ben is Checked] -or [Dave is Checked] |
| Basic AND | [Ben is Checked] -and [Dave is Checked] |
| Grouped OR inside AND | ([Ben is Checked] -or [Dave is Checked]) -and [Machine Check] |
| Two Groups | ([Ben is Checked] -or [Dave is Checked]) -and ([Apps Check] -or [MailBox Check]) |
| Deep Nesting | (([Ben is Checked] -or [Dave is Checked]) -and [Machine Check]) -or [Bespoke Check] |
| Exclude Using Opposite Rule | ([Ben is Checked] -or [Dave is Checked]) -and [Is Not a Factory PC] |
| Complex Real‑World Example | (([Apps Check] -and [Machine Check]) -or ([MailBox Check] -and [Bespoke Check])) -and [Is Not a Factory PC] |
Readiness Examples
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| Apps Are Ready | Field | AR:IsReady | == | true |
| Has Any Apps | Field | AR:Total | > | 0 |
Explanations
- Apps Are Ready: Passes if all apps linked to the record are ready.
- Has Any Apps: Passes if at least one app is assigned.
Readiness More Details
Readiness rules let you evaluate the status of related modules using readiness metrics. Use the module prefix with the column name:
| Module | Prefix | Example |
|---|---|---|
| Applications | AR | AR:IsReady == true |
| User Migrations | UR | UR:Total > 0 |
| Devices | DR | DR:ReadyPercent > 75 |
| Mailboxes | MR | MR:OutOfScopeCount < 5 |
| Bespoke Module | BR | BR:ReadyCount == 15 |
| Defects | DY | DY:IsReady == true |
| Tasks | TR | TR:RemainingCount < 5 |
Readiness Metrics
IsReady: Boolean, true if all items in the module are ready.Total: Number of linked items.ReadyCount: Count of items marked ready.RemainingCount: Items not yet ready.ReadyPercent: Percentage of ready items.OutOfScopeCount: Items excluded from readiness.
Partial Text Matching – Like
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| DSK | Field | Hostname | Like | DSK* |
| TES | Field | Hostname | Like | Tes* |
Explanations
- DSK: Matches hostnames starting with “DSK” (e.g. DSK001).
- TES: Matches hostnames starting with “Tes” (e.g. TesServer).
Custom Logic: [TES] -or [DSK] — Passes if either rule is successful.
About the Like Operator
DSK*matches any value starting with “DSK”.Tes*matches any value starting with “Tes”.
Logic Tips
- Use
-orto allow a match for any pattern. - Use
-andto require all matched. - Parentheses
( )group logic for order of evaluation.
Example: ([TES] -or [DSK]) — Passes if hostname matches TES or DSK.
Regex Plan Rule
Check an Email Address is Valid
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| Email Address Valid | Field | Match | ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$ |
Explanation
- Validates the
Emailfield against a standard email address format.
Regex Explanation
^— Start of string[a-zA-Z0-9._%+-]+— Local part, valid characters before the@@— At symbol[a-zA-Z0-9.-]+— Domain part\.— Dot before domain suffix[a-zA-Z]{2,}— Suffix of at least two letters$— End of string
Examples that pass:
user@example.comfirst.last@domain.co.ukname123@sub.domain.net
Examples that fail:
user@domain(missing suffix)@domain.com(missing local part)user@.com(invalid domain)
Evaluate if a Text Field Has a Value of 16 or More
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| 16Gb or More | Field | DV:Memory | Match | \b[1-9][6-9]\b |
Explanation
- Matches two-digit values from 16 to 99 (e.g. memory in GB).
Regex Explanation
\b— Word boundary[1-9]— First digit (1–9, not 0)[6-9]— Second digit (6–9)\b— Word boundary
Examples that pass: 16, 32, 64, 99
Examples that fail: 15, 08, 100
Note: This pattern assumes values are stored as integers. Adjust the regex if units (e.g. GB) are included.
Using the [Blank] Keyword
| Rule Name | Rule Type | Data Location | Operator | Criteria |
|---|---|---|---|---|
| Field | Field | DeployUnit | != | [Blank] |
Explanation
- Passes if the
DeployUnitfield contains any value.
Usage:
== [Blank]: Passes if the field is empty.!= [Blank]: Passes if the field is populated.
The [Blank] keyword identifies missing or unassigned data, useful for data quality and validation checks.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article