Use > Service Manager Reports > My reports > Build the query strings

Build the query strings

You can use query filters to define the report content logic when you create a report. This topic provides specifications to explain how to configure the strings for the query parameter when you create a report. The query display field is read-only, and you can use the query builder to define the condition for the report. HPE Service Manager also supports cross-table queries.

HPE Service Manager provides the following types of query parameters.

Query type Sample Procedure
Simple query Open incident backlog group by priority

Click Query Builder to fill in the requirements for the query results. You can edit the filter fields and check the check box to specify the required conditions. Click OK to generate the query strings directly in the query display field.

Cross-table query Open incident group by affected CI

Click Query Builder and select Advanced Filter to specify the query conditions. For more information about how to use advanced filter, see Advanced filter and other related topics.

Note All relationships between tables are stored in relatedObjectMap.

Advanced Query Support variables All incidents assigned to my group

Select one assignment group. The query will be generated automatically, and then you can change the query to use the variables.

assignment isin $lo.pm.assignments

Support JSCall incident for falcon

function getDefaultComp(){return "falcon";}

assignee.name =jscall("test.getDefaultComp")

Support RTE function All incident assigned to me assignee.name = operator()
Support new method startofyear, startofmonth, and startofweek

startofweek() returns the first day of the current week

startofweek(startofweek() - 1) returns the first day of the last week

After you enter a query string, you can click Test Query to validate the query. A new message pops up, displaying the diagnostic information for this query string.

  • When you enter 1=1 condition, Service Manager displays the following message:

    Current search criteria is equal to "(1=1)", full table query would be needed.

  • When the field is CLOB/BLOB, Service Manager displays the following message:

    Partial File Scan might be needed since field "action" (on file probsummary) is mapped to BLOB/CLOB/TEXT/IMAGE [Description field in cm3r]

  • When the field is not indexed, Service Manager displays the following message:

    There is no index defined in dbdict for field "sysmodtime" (on file kmfeedback). [sysmodtime in kmfeedback]