CSM 10.4 Documentation

Home

Search Queries

A Query defines the criteria for retrieving specific data, such as find All Incidents.

A Query contains:

  • A Grouping Clause: Tells CSM if the Query uses AND (all are true) or OR (any are true) logic.
  • One or more additional Clauses (the word or phrase that starts the Query), each comprised of one or more conditions.

    Search Incidents Example Query

Queries are built using clauses and conditions:

  • Clause: A clause combines User specified conditions that are used to narrow the scope of a Query. CSM provides the following clauses:
    • Group Clause: A Group Clause is a Query Clause that groups together several Clauses. When you group Clauses you must decide if all Clauses must be true (AND logic), or if only one Clause must be true (OR logic), in order to retrieve the record.
    • Comparison Clause: A Comparison Clause is a Query Clause that finds all records containing a field with a particular value.
    • Ownership Clause: An Ownership Clause is a Query Clause that finds records associated with a particular owner (person or Team).
    • Related Clause: A Related Clause is a Query Clause that finds Business Objects whose related Business Object satisfy some of the criteria.
    • Queue Clause: A Queue Clause is a clause that finds all records that exist or do not exist on Queues. It also finds records that are available, checked out, and suspended on Queues. For more information, see About Queues.
  • Condition: A condition is a Dynamic Value that adds to the requirements of a Query, which may consist of one or more of the following:
    • Fields: A Field is a basic unit of information (example: ID, last name, address, etc.) that is specific to a Business Object (example: Incident, Problem, Service, Customer, etc.).
    • System Functions: A System Function is a built-in placeholder Token that dynamically adds variable information to a query or string (example: Current User's name). For more information, see About System Functions.
    • Prompts: A Prompt is a display window that requires Users to provide information before proceeding with a process or Action (example: Specify the reason for putting an Incident into Pending status).
    • Expressions: An Expression is a combination of explicit values, constants, variables, operators, and functions that receive input, manipulate the data, and then output the data. In other words, an Expression interprets a value, and then produces another value as a result (example: The IncidentDurationInDays Expression calculates the amount of time that elapses between the time an Incident is created and closed).
    • Stored Values: A Stored Value is a named entity that stores commonly used information so that it can be accessed and/or reused from various places in CSM, such as One-Step Actions and Queries.
    • Metrics: A Metric is a stored measurement query whose value can be used to measure, monitor, and predict service desk performance and trends (example: Average time to resolve Incidents).
    • Operators: An operator is a word or phrase (equals, greater than, contains) that provides the necessary information for two values to produce an output. The availability of operators depends on the type of values you choose for a Search Clause. For more information, see Operators.
      Note: Search Queries are SQL Queries but prior knowledge of SQL is not needed because CSM converts the searches to the appropriate SQL Queries behind the scenes.

Was this article useful?