Return to Data Analysis
Why? Sometimes there may be a need to get some insight into certain information but which does not require a full blown report. Query designer can produce a quick list of a specific criteria and display any fields relevant in a tabular format.
On the ServicePRO Workbench select the Data Analysis tile, and click on the Queries icon. This will open the Query Listing window.
- New Request Query: Create a New Request Query.
- New Discovered Item Queries: Create a New Discovered Item Query.
- Update: Update and edit the selected query.
- Delete: Delete the selected Query.
- Run: Run the selected query.
- Schedule and Email: Set up schedules for emailing queries to designated users.
- New: Create a new folder.
- Rename: Rename an existing folder.
- Find: Find a folder.
Left Query Folder Panes On the left panes, users can navigate between folders where Queries are stored. Request Queries
- My Queries: View queries that you have created and saved.
- My Views: Preview a list of previously created customized views.
- Public Queries: View queries that have been created by yourself or another user which have been saved as Public.
Discovered Item Queries
- My Queries: View Discovered Item queries that you have created and saved.
Query Listing Pane This section lists all queries available for viewing based on the folder selected in the "Folder List" section.
Query Designer Window Click on the “New Request Query” icon to bring up the Query Designer Window. Queries can be created to filter and view specific data about service requests. You can save queries for future use and make them available to others. The Query
Designer window is shown below:
The Request Field Selection work area provides a tree view of the database fields available to view or set conditions on. Expand items and use the checkboxes to select the fields you want to use in the query.
As fields are selected, they appear in a table in the Design and Preview work area. Use this table to refine your query by applying various criteria. You can also define a sort order for the data and specify whether fields should be hidden or shown in the query results.
- View the settings for any cell in the Design and Preview tables by clicking in that cell.
- Click in a cell in the Caption column to change the field name that should appear in your query.
- Click in a cell in the Show Field column to view or hide that field in the query result. Use the drop-down list in the cell and select “Yes” to view the field or “No” to hide it.
- Click in a cell in the Sort By column to sort the data in the column in ascending or descending order. Leave this value at “None” if you do not want to sort.
- If you chose to sort your query (in the previous step), define the sort order for each query item by entering a value in the item’s cell in the Sort Order column. For example, if you wanted to sort the query by Status then Category then Current Priority you would enter a “1” in the Sort Order cell for Status, a “2” in the Sort Order cell for Category then a “3” in the Sort Order cell for Current Priority.
- Click in a cell in the Ask Criteria on Execution column to define whether you want to be asked for criteria for the related field when you run the query.
- Click in a cell in the Selection column to enter criteria for the related field. A window similar the one shown below appears.
- Click on the And or Or Selection Type radio button to select the operator you want to use to combine your search strings. In the example above, the search would find requests that are either “In Dispatch” or “In Service.”
- The first Criteria field lists the field you are using in the query.
- Use the next field’s drop-down list to select “Equal to” or “Not Equal” to define whether the field contents should equal ( or not equal) the selected value.
- Use the final drop-down list to select the value for which you are searching.
- Click on the Add button.
- Repeat steps 9–12 to add conditions.
- To clear a condition, highlight it and click on the Remove button.
- Click on the OK button to save your selection criteria.
As you design your query, you can test it by clicking on the Preview Query Results tab to view results as shown in the figure below
- When you are satisfied with the query, use the Name work area to enter a name in the Query field.
- If the query should be available to other users with “Data Analysis” privilege, click on the Public radio button.
- If the query should only be accessed by the creator, click on the Private radio button.
- From the Data Analysis tab, click on the Queries icon and select a Query folder.
- Select a Query from the right pane.
- Double click the query you want to run, or select the Run button from the Ribbon Toolbar. The results will display in a grid similar to that shown in the figure below.
- Double-click on a request to view its details.
A Schedule and Email Query prompt will appear.
- Occurs - Select from Daily, Weekly, or Monthly occurrences, and how often the scheduled email is sent.
- Frequency - Select the frequency of scheduled emails sent within a day by selecting time intervals. Select between:
- Occurs Once At: A designated time once in the daytime
- Occurs Every: The frequency occurrence in hours or minutes throughout the day. Users will also need to provide a time at which the schedule starts and finishes being sent for this day.
- Range - Select the date range for which these scheduled emails occur. The Start date can be designated by a calendar prompt, while the end date has several options:
- No End Date
- End After X occurences
- End By
Users can choose to Edit templates by selecting the Edit button in the right column, or create New email templates by selecting the "New ..." link under the Captions column.
The scheduled query will be included along with the template automatically.
- The Schedule Tab will allow users to set the day occurrence, time frequency, and date range for the scheduled emails.
- The Email Tab will allow users to create accompanying email templates.
- Email recipients will receive the auto-generated query results as Excel spreadsheet (.XLS) attachments.
If a query does not contain any records at time of being generated for emailing, by default, only the original creator of that query will receive notification email(s) stating that there are no records.
If the creator does not wish to receive the email, an option to switch the no records notifications to be sent to all the notification email recipients instead. Please contact ServicePRO Technical Support for more information and assistance in enabling this feature.