Add a Search Query to a Workflow

Workflows > selected Workflow > Edit

Requires Workflows - Add/Edit Permissions

When you edit a query for a step in a Workflow, either to add a new query or edit an existing query, you can use the Search Query popup to specify the query using one of the following:

  • Freeform Search
  • Advanced Search
  • Bulk Search (set up to run as a Combined Search)

Note: You can use the Include Families and Include Metadata options for the searches supported for a Workflow. However, Generate Reports does not apply to searches included as part of a Workflow.

To select an existing search, use one of the following tabs:

  • Search History (the default) — Use this tab to select an existing term-based search from Search History.
  • Saved Searches — Use this tab to select an existing Saved Search.

Select a Search from Search History

The Search History tab for a Workflow displays the following columns by default:

Note: You can right-click a column and get column information. For example, the Search Task column is always visible. You can also use Reset All Filters to clear/reset any filtering you have performed for Search tasks.

  • Search Task — The Search task (for example, (angels) in Right vs. Wrong or More Like ethics_doc.txt in Right vs. Wrong). This may be a portion of the Search task if the Search query is large.
  • Filter row text box – You can use the Filter row text box under the Search Task column. (The icon indicates that filtering is available.) Using the Filter box enables you to pinpoint the items you want to work with based on a Filter term search containing one or more characters you enter. You can explicitly apply a filter by typing one or more characters in the text box and clicking Enter (the return key). If you type one or more characters in the text box, the software will automatically apply the filter for you, and the text box changes to a yellow background color. For any applied filter, you can then clear the filter by removing the text in the box and clicking Enter, by removing the text from the box, or by clicking the that appears at the far right of the Filter row text box. Clearing a filter restores the list to its original state.
  • Results — The number of document results associated with the Search.
  • Owner – The owner of the Search. By default, you can see only your own searches, so your username will be shown as the Owner. If you have the appropriate permissions (Audit Access), you can use the filter row text box drop-down to select All, which enables you to view the searches of all other users in the Project.

Note: Workflow queries are intended to be from searches of Project Data or searches of Project Data-based views. Any Sample is not available for selection in the Workflow Search Selector and is not listed. Also, an existing parent Bulk Search is not listed in the Workflow Search Selector. Individual searches from a Bulk Search are selectable, however. Also, you can set up a new Bulk Search to run as a Combined Search.

Select a Saved Search

The Saved Searches tab for a Workflow displays the following columns by default:

Note: You can right-click a column and see the available column options. You can hide the Description and Created By columns.

  • Name – The name assigned to an available Saved Search.
  • Search Task — The associated search task identifying the query and the target (for example, high OR low in Project Data).
  • Description — The description assigned to a Saved Search.
  • Created By — The user who created the Saved Search.

Use Freeform Search

For a given step in a Workflow, you can provide a Freeformquery (for example, you can enter a term search query, phrase search, or metadata field search). Freeform search is useful if you have a simple query, or if you already know the search syntax and do not need help building a query.

Note: Your Search syntax is determined by a Project Search Setting.  By default, a Project uses Standard for the Project Search Setting, which means that you must use the Standard Search Syntax to form your Searches. See Standard Search Query Syntax for information on how to build Standard syntax queries. You may want to become familiar with this syntax before performing a Search other than a simple term search.

Freeform Search supports options that affect the results of your Search, such as Include Metadata and Include Families, which are enabled by default. Generate Reports does not apply to a Freeform search included as part of a Workflow.

Note: If your Search query is the equivalent of having a standalone wildcard, the search will generate an error with a message that identifies the first occurrence of the error in a clause: The provided query has a phrase containing a standalone wildcard, potentially due to characters treated as spaces. Please adjust and rerun the query (In Phrase: <phrase> At position <value>). This error prevents your query from expanding to more terms than the system can reasonably accommodate based on resources. In general, it is best to avoid an overly broad use of wildcards.

Use Advanced Search

For a given step in a Workflow, you can use Advanced Search (for example, to add a new query). This type of search enables you to build a query with a variety of search options, without having to know the details about the search syntax.

Advanced Search supports options that affect the results of your Search, such as Include Metadata (enabled by default), and Include Families (enabled by default). Generate Reports does not apply to an Advanced Search included as part of a Workflow.

For an Advanced Search, you can use just the Date Range section to serve as a step in the Workflow. This causes the type of the query to become Date Range.

Use Bulk Search (as a Combined Search)

For a given Workflow Step, you can set up a Bulk Search that runs as a Combined Search of queries. A Bulk Search for a Workflow can only run as a Combined Search using your selected operator.

A Bulk Search that is part of a Workflow supports the following:

  • A Queries box with a line for each query. You can enter each query manually, paste a number of queries, or upload a local text file of queries. The Queries box can support up to 5000 lines of queries. To clear a line in the Queries box, click the that appears at the far right of the line. To delete a given line, click the icon to the right of the line.
  • The Load from Local File... option, which enables you to load queries from a local text file, one query per line. Using this option populates the Queries box with the queries from the text file.
  • The Clear All option, which enables you to clear all lines in the Queries box.
  • Run as Combined Search using: From the drop-down, select the appropriate operator to use between your queries. The default is OR.
  • Include Metadata and Include Families, which affect the scope of your results and are enabled by default.
  • The button, which is optional for a Bulk Search that is used as a step in a Workflow. As long as you have populated the Queries box, clicking this button will check each query in the Queries box and help you identify errors before you add the Bulk Search as a step. (Once you add the Bulk Search as a step, it becomes a Freeform Search that is checked during validation of the entire Workflow.) For queries with warnings and/or errors, you will see a status message <count> queries contain warnings/errors. To help you, each query displays a line number. You can then navigate through each line with an invalid query or a query with a warning for a Unicode character by using the previous and next controls shown in the message and validate again when you are done addressing all of the warnings and/or errors. Hovering over an invalid query enables you to see the specific syntax error. After addressing all invalid queries, perform validation again and add the Bulk Search as a step in the Workflow.

Note: When performing validation of queries shown in the Queries box, each query has a line number, and you will see messages about the status of the validation. When there are queries that need attention in the Queries box (either queries with errors or queries with warnings concern Unicode replacement characters), the Validating Bulk Search Query task in the Work Basket will use the icon to indicate that the task completed with warnings/errors. Hovering over the icon changes it to a download icon, which you can then click to download a WARNING_DETAILS_REPORT.csv file that contains columns for the Line Number, Error, and Query. The Error column will identify the appropriate syntax error or the warning message Warning: This query contains the Unicode replacement character. If these characters are not intended, change the query or encoding of the file before proceeding. UTF-8 is expected.

As a step in a Workflow, Bulk Search does not support the following:

  • By Metadata Field checkbox
  • The ability to load from a Connector file
  • Generate Reports

See Bulk Search for basic information about setting up a Bulk Search.

Main Workflow Search Actions

  • OK – Saves the search query for a Workflow step. The next time you return to view the current query, you will see the query in the appropriate Search based on how you entered the Search or how it was originally run (for example, Freeform or Advanced Search). Note that once you initially set up a Workflow step as a Bulk Search (which runs as a Combined Search), returning to view the query will show the Combined search under Freeform. (The checkbox for a previously selected Saved Search or Search from Search History is therefore no longer selected.) If you want to replace the current Search query, clear the query shown in Freeform or Advanced Search and then select another Search from the Search History, or type a new query.
  • Cancel – Cancels the addition or modification of a search query for a Workflow step.