Selection criteria

Selection criteria can consist of attributes, operators, and values that are combined into a search clause.

When adding a selection criteria clause to a script, remember the following guidelines:

  • Surround the entire selection criteria with double quotation marks and surround individual string values with single quotation marks.
  • Complex clauses can be created by grouping values. For example, “(Job.ID > 100000015) and ((Job.Duplex = ‘Yes’) or (Job.TotalPages > 100))”
  • Job and document attributes cannot be combined in the same clause.
  • Date and time values must be in a format that can be converted from a text string to a timestamp. This format is YYYY-MM-DD HH:MI:SS:FFFFFF. The full timestamp can be shortened, for example YYYY-MM-DD or YYYY-MM-DD HH:MI.

Operators

The following table describes the operators you can use in selection criteria clauses.

Operator Description Example
=, !=, <>, >, >=, <, <= The available comparison operators. “Job.ID = ‘100000015’”
and Returns results that meet all the specified criteria. In the example, only jobs that have both a Job.ID of 100000015 and a Job.Name of AcmeMortgage are returned. “Job.ID = ‘100000015’ and Job.Name = ‘AcmeMortgage’”
in Returns results for values that belong to a membership. In the example, only the results for jobs that have a Job.ID of 10000015, 10000020, or 10000023 are returned. “Job.ID in (‘10000015’, ‘10000020’, ‘10000023’)”
like Returns a value that matches a specified pattern. You can use the following wildcards.
  • Use the % wildcard to match a group of characters. In the example, test% would return test, tests, tester, tested and testing.
  • Use the _ wildcard to match a specific number of characters. For example, test_ would return only tests while test__ would return only tester and tested.
A null value or pattern is treated as an empty string.
“Job.Name like ‘test%’”
not Returns results that do not meet the specified criteria. It can be used with other operators. In the example, all jobs with a Job.ID greater than 100000015, except for 10000020, are returned. “Job.ID > ‘100000015’ and not Job.ID = ‘10000020’”
or Returns results that meet any of the specified criteria. The jobs do not need to meet all specified criteria to be returned. In the example, jobs with the Job.Name AcmeMortgage or AcmeInsurance are returned. A job would not need to have two Job.Name values to meet the specified criteria. “Job.Name = ‘AcmeMortgage’ or Job.Name = ‘AcmeInsurance’”
 
Copyright © 2014, 2018