Advanced searches in Workplace

You can use advanced searches in Workplace when you need more complex searches that cannot be built by using basic queries or when you want to aggregate multiple smaller queries into one query to reduce maintenance and improve performance. With advanced searches, you can sort and combine filters by using together keywords such as NOT, AND, and OR.

The advanced searches in Workplace are available in both federated and nonfederated environments. In federated environments, advanced searches are enabled, but it is recommended that you configure BPD indexing. In nonfederated environments, you must configure a federated data repository on your Business Automation Workflow servers. When a federated data repository is configured in your environment, the advanced searches work with processes and tasks. For more information, see Administering the federated data repository indexes.

Typically, a search query that is created using basic filters can be converted to an advanced search and back. However, when a query that you created by using an advanced search includes one or more elements that are not supported by the basic search, the advanced search cannot be converted into a basic search. Similar to basic searches, you can save your advanced searches for reuse or share them with other people or your team.

You do not need to use the advanced searches if one of the following conditions is met:
  • You do not have complex search criteria. Use basic searches instead.
  • You are not comfortable using the advanced search query syntax. Combine filters and use the basic searches instead.
For more information, see Basic searches in Workplace.
Review the following sections to learn more about the advanced search capabilities in Workplace:

Syntax

An advanced search consists of a filter and an (optional) sort clause.

Filters
A filter can be any of the following options:
Table 1. Filters
Filters Description
field operator value A basic filter. For example, "Name" is "Approval".
(filter) Enclose filter in parantheses to change the default priority of the keywords not, and, and or.
not filter The not keyword applies to only one filter (basic or compound) and creates a new filter that evaluates to true when the original filter evaluates to false, and vice versa.
filter and filter Two filters that are combined together by using the and keyword create a new filter that evaluates to true when at least one of the initial filters evaluates to true, and evaluates to false otherwise.
filter or filter Two filters that are combined together by using the or keyword create a new filter that evaluates to false when both initial filters evaluate to false, and evaluates to true otherwise.
Sort
The sort clause consists of the keyword order by, followed by field and (optional) order.
A sort example can be: order by "Name" ASC
Keywords
Keywords are case-insensitive:
  • and, or, not, order by
  • operators
  • sort order
Note: The search has the following format: filter (optional sort) The
following rules apply:
  • The sort clause is always placed after the filter
  • The sort clause cannot be enclosed in parantheses ().
  • The "in" operator supports array values. For example, "Name" in (val1, val2, val3).
Important: The sort clause must be placed last, at the very end of the search. Anything added after sort renders the search filter invalid. For example, the following filter
Department is Finance order by Department ASC and Name is test (invalid)
is invalid because the sort clause order by Department ASC should have been placed at the end.

Back to top

Reference

The following information provides an overview of the fields, operators, and values that you can use to build your advanced search queries in Workplace.

Table 2. Filter attributes
Filter attributes Description
Fields Fields can be:
  • System data
  • Business data
Restriction: Note that the "Task state" or "Workflow state" fields can only be used once, and cannot be preceded or followed by the keyword OR. Also, the "Task state" and "Workflow state" fields cannot be preceded by the keyword not.
Operators
  • is or =
  • is not or !=
  • in
  • contains
  • starts with
  • <
  • >
Value Value supports text that is enclosed in single or double quotation marks (", '). For example, "Approval", 'Approval'.

If the value is not enclosed in quotation marks, make sure that the string does not contain any space.

If the type of field is Boolean, the values are:

  • true
  • false
If the type of field is Date, the value supports multiple date formats:
[

  // Year formats
  'YYYY',                 // Example: 2021

  // Year and month formats
  'YYYYMM',               // Example: 202108
  'YYYY-MM',              // Example: 2021-08

  // Month and year formats
  'MMM YYYY',             // Example: Aug 2021
  'MMMM YYYY',            // Example: August 2021
  'YYYY MMM',             // Example: 2021 Aug
  'YYYY MMMM',            // Example: 2021 August

  // Month formats
  'MMM',                  // Example: Aug
  'MMMM',                 // Example: August
 
  // Month names and day formats
  'MMM D',                // Example: Aug 5
  'MMM DD',               // Example: Aug 05
  'MMMM D',               // Example: August 5
  'MMMM DD',              // Example: August 05

  // Year and month formats with separators
  'YYYY/MM',              // Example: 2021/08
  'YYYY-MM',              // Example: 2021-08
  'YYYY_MM',              // Example: 2021_08
  'YYYY.MM',              // Example: 2021.08

  // Month and day formats with separators
  'M/D',                  // Example: 8/5
  'MM/DD',                // Example: 08/05
  'D/M',                  // Example: 5/8
  'DD/MM',                // Example: 05/08
  'M-D',                  // Example: 8-5
  'MM-DD',                // Example: 08-05
  'D-M',                  // Example: 5-8
  'DD-MM',                // Example: 05-08

  // Day, month, and year formats
  'D MMMM YYYY',          // Example: 5 August 2021
  'D MMM YYYY',           // Example: 5 Aug 2021
  'DD MMMM YYYY',         // Example: 05 August 2021
  'DD MMM YYYY',          // Example: 05 Aug 2021
  'MMMM D YYYY',          // Example: August 5 2021
  'MMM D YYYY',           // Example: Aug 5 2021
  'MMMM DD YYYY',         // Example: August 05 2021
  'MMM DD YYYY',          // Example: Aug 05 2021
  'YYYY MMMM D',          // Example: 2021 August 5
  'YYYY MMM D',           // Example: 2021 Aug 5
  'YYYY MMMM DD',         // Example: 2021 August 05
  'YYYY MMM DD',          // Example: 2021 Aug 05

  // Short date formats
  'D/M/YY',               // Example: 5/8/21
  'DD/MM/YY',             // Example: 05/08/21
  'DD/MM/YYYY',           // Example: 05/08/2021
  'D/MM/YY',              // Example: 5/08/21
  'D/MM/YYYY',            // Example: 5/08/2021
  'DD/M/YY',              // Example: 05/8/21
  'DD/M/YYYY',            // Example: 05/8/2021
  'M/D/YY',               // Example: 8/5/21
  'MM/DD/YY',             // Example: 08/05/21
  'MM/DD/YYYY',           // Example: 08/05/2021
  'M/DD/YY',              // Example: 8/05/21
  'M/DD/YYYY',            // Example: 8/05/2021
  'MM/D/YY',              // Example: 08/5/21
  'MM/D/YYYY',            // Example: 08/5/2021
  'YYYY/MM/DD',           // Example: 2021/05/08
  'YYYY/M/DD',            // Example: 2021/5/08
  'YYYY/MM/D',            // Example: 2021/05/8
  'YYYY/M/D',             // Example: 2021/5/8

  // Short date formats with dash
  'D-M-YY',               // Example: 5-8-21
  'DD-MM-YY',             // Example: 05-08-21
  'DD-MM-YYYY',           // Example: 05-08-2021
  'D-MM-YY',              // Example: 5-08-21
  'D-MM-YYYY',            // Example: 5-08-2021
  'DD-M-YY',              // Example: 05-8-21
  'DD-M-YYYY',            // Example: 05-8-2021
  'M-D-YY',               // Example: 8-5-21
  'MM-DD-YY',             // Example: 08-05-21
  'MM-DD-YYYY',           // Example: 08-05-2021
  'M-DD-YY',              // Example: 8-05-21
  'M-DD-YYYY',            // Example: 8-05-2021
  'MM-D-YY',              // Example: 08-5-21
  'MM-D-YYYY',            // Example: 08-5-2021
  'YYYY-MM-DD',           // Example: 2021-05-08
  'YYYY-M-DD',            // Example: 2021-5-08
  'YYYY-MM-D',            // Example: 2021-05-8
  'YYYY-M-D',             // Example: 2021-5-8

  // Date formats with month names
  'DD MMM YY',            // Example: 05 Aug 21
  'DD MMM YYYY',          // Example: 05 Aug 2021
  'DD MMMM YYYY',         // Example: 05 August 2021
  'D MMM YY',             // Example: 5 Aug 21
  'D MMM YYYY',           // Example: 5 Aug 2021
  'D MMMM YYYY',          // Example: 5 August 2021

  // Date formats with month names and year, month names and day
  'MMM D, YY',            // Example: Aug 5, 21
  'MMM D, YYYY',          // Example: Aug 5, 2021
  'MMM DD, YYYY',         // Example: Aug 05, 2021
  'MMMM D, YYYY',         // Example: August 5, 2021
  'MMMM DD, YYYY',        // Example: August 05, 2021

];
If the field contains predefined values, these values are returned by an API:
  • Priority:
    [
      "Very High",
      "High",
      "Normal",
      "Low",
      "Very Low"
    ];
  • Status:
    [
      "Actioned",
      "Alert",
      "Answered help request",
      "Closed",
      "Collaboration",
      "Comment",
      "Deleted",
      "Followed",
      "Forwarded",
      "Help request",
      "Ignored help request",
      "New",
      "New or received",
      "Received",
      "Replied",
      "Sent",
      "Special",
      "Tagged"
    ];
  • Task state:
    [
      "All",
      "Available",
      "Claimed",
      "Claimed and available",
      "Completed"
    ];
  • Activity type:
    ["Decision task", "Service task", "User task"]
  • Workflow status:
    [
      "Active",
      "Completed",
      "Did not start",
      "Failed",
      "Suspended",
      "Terminated"
    ];
Table 3. Sort attributes
Sort attributes Description
Field System and business data
Order
  • ASC (ascending)
  • DESC (descending)

Back to top

Examples

The following examples are provided for a better understanding of the query concepts and syntax.

Example 1
Query: Get all tasks with names that contain “Approval”.
Syntax: "Name" contains "Approval"
Advanced search syntax: "Task state" is "Name" contains "Approval"
Example 2
Query: Get all tasks that have Department equals Finance. Sort the list by task due date in ascending order.
Syntax: "Department" is "Finance" order by "Due on" ASC
Advanced search syntax: "Department" is "Finance" order by "Due on" ASC. The cursor opens in the Advanced search edit box, and starts typing "Department", then selects the keyword IS, types "Finance", selects the field order by, next "Due on", and finally selects the sort order ASC.
Example 3
Query: Get all tasks that are not decision tasks and task names do not contain “Activity”.
Syntax: not("Activity type" is "Decision task" and "Name" contains Activity)
Advanced search syntax: The cursor opens on the Advanced search edit box and starts typing the syntax. As it types "n" for NOT, the advanced search offers a list of auto-complete suggestions. The cursor selects NOT from the auto-complete list and then continues selecting "Activity type", then "Decision task". It then selects the AND keyword, starts typing "n" and selects "Name" from the list, then selects "contains" and finally types "Activity". The final syntax reads: not("Activity type" is "Decision task" and "Name" contains Activity.
Example 4
Query: Get all claimed and available tasks that do not have a completed date past 16 April 2024.
Syntax: "Task state" is "Claimed and available" and not("Completed on" > "04/16/2024")
Advanced search syntax: "Task state" is "Claimed and available" and not("Completed on" > "04/16/2024")
Example 5
Query: Get all tasks with names that contain “Approval” or whose hiring manager is Bob.
Syntax: Name contains "Approval" or "Hiring Manager" is Bob
Advanced search syntax: Name contains "Approval" or "Hiring Manager" is Bob. The cursor opens in the Advanced search edit box, and starts typing "n" then selects "Name", types "c" then selects contains, types "Approval", then selects the keyword OR, then types "h" and selects "Hiring Manager", and finally types "Bob".)

Back to top