Views


Note: This document describes the screen for editing autonomous views. The descriptions of their criteria, conditions and data entry mode are identical to those for a reporting view.
Definition

A view is an object allowing to consult information stored in tables. This is based on the presentation of information, how it is grouped and its page layout.

EndDefinition

Each view:

  • Is built around a parent query that accesses a set of standardized data from the database.
  • Can contain grouping levels:
    • Data is grouped and sorted by level. These levels filter data based on hierarchy. 
    • Information from the lowest level is displayed in a list containing configured columns with one row for each record.
  • Can contain visual alerts where special formatting is applied when the value satisfies certain conditions. This is used to highlight critical information in the lowest level. Open url.png See the example.
  • Can be associated with:
    • A menu option, e.g. the Equipment by location view is available in the equipment inventory. In this case, it is autonomous and is a full functionality in Service Manager.
    • A report to restrict its scope, e.g. the Number of late incidents this week view defined for the report. In this case, it will only run as a component within this object. 
  • Can access the Google Maps geolocation service to position Google map icon.png markers on a map using the location name, address, city and country.

Examples

1. The Equipment view associated with the Equipment inventory menu option is defined with the following criteria:

  • Two grouping levels: Model > Location (last level)
  • Three last-level information to display: Type; Asset; Status

    How to browse through the view?

  • Select a view ==> First grouping level displayed = All models
             View - Final presentation - drilldown level 1.png
  • Select a model ==> Second grouping level displayed = All locations where the model is available.
             View - Final presentation - drilldown level 2.png
  • Select a last-level location ==> Last-level information displayed in a grid = All equipment associated with the model for the selected location.
     

    Last-level display of the view
         View - Final presentation without visual alerts.png


2. Visual alerts are defined in the Status field:

  • Alert for the Out of Order status:
         Condition = Out of Order;  font = Arial;  style = Bold;  background color = red
  • Alert for the In Stock status:
         Condition = In Stock;  font = Arial;  style = Normal;  background color = green
     

    Last-level display of the view
         View - Final presentation with visual alerts.png

Notes

  • Do not confuse the views described in this document with the SQL views used as tables in parent queries for adding fields.
  • Only a profile with the right to edit views for the module associated with the menu option can modify it.
  • For autonomous views associated with a menu option, access rights are defined by profile
  • You can add other fields to the parent query of the view manually, as long as you are authorized to edit the display for the module associated with the menu option that opens the view.
    • Perform this operation before editing the view.
    • Fields added manually appear with their alias. If the alias is not specified, then the physical name will appear.

      example  Alias: Phone, Physical Name: PHONE_NUMBER

  • In each menu option, there is a predefined List view for viewing all records at the lowest level.
  • A default display mode is defined for the view.
    • Views with grouping levels can also be displayed in graphs using the icons found to the right of the View drop-down list, e.g. Sector mode icon.png pie chart, Histogram mode icon.png bar chart, Geographical mode icon.png map, Google map icon.png Google Maps geolocation.
    • List mode icon.png Can display the List mode directly without going through intermediate grouping levels. 
  • In the case of tree fields such as Location, Department, Type, and Analytical Cost Allocation, only a Last Level field can be defined as a grouping level.
  • The formatting defined in visual alerts is not printed when you click Print icon.png.
  • Positioning of locations using Google map icon.png markers on a map:
    • This uses a Google Maps API. You are required to have a Google Maps API key.
      Open url.png  See the procedure.
    • To minimize calls between the client workstation and the Google Maps servers, geodecoding information is stored in the database once it has been obtained. It is only re-requested in the case of a change of address.

Best Practice

  • To ensure that information is grouped in a meaningful way, you should select fields that can group more than one value as grouping levels.

    example   It is pointless to define the asset tag as a grouping level in a list of equipment because asset tags are unique.

  • Display Name:
    • Give a descriptive name that enables users to understand the hierarchy of grouping levels easily.
    • You should generate names automatically once you have built the hierarchy of grouping levels.
    • If you modify the hierarchy of grouping levels, remember to modify the name of the view or to regenerate it automatically.
  • Visual alerts:
    • You should use the most frequently used fonts such as Arial, Courier, Verdana or Times New Roman to avoid display issues in different Web browsers.
    • In the conditions of alerts, you should specify the exact values of fields which are case-sensitive and accent-sensitive.
    • In the conditions of alerts, if the value to be specified contains a dash, you should place the value within quotes.

      example  Condition on priority: '1 - High'.

    • In a multilingual context, you should define as many alerts as there are labels for the value.

      example  In the Status field, you define English and French values Out of Order (EN) and En panne (FR) for the same alert.

Characteristics specific to versions 2016 and earlier

The View form in versions 2016 and earlier is different:

  • Access
  • Graphic interface:
    • Screens in the View form
    • You can apply both a text color and a background color for displaying the field value in visual alerts.

Access

In any screen in List mode, Edit View Edit icon.png option in the View list in the top banner

Screen description

         View.png

Toolbar

Add icon.png: Used to create a new view.

Save icon.png: Used to save the view.

Duplicate icon.png: Used to duplicate and save the view using another name. The entire display of the view is duplicated.

Trash icon.png: Used to delete the view.

Display Name: Name identifying the view. 

  • View - Multilingual labels icon.png : Used to enter multilingual labels manually for the name of the view.
  • Sheet full icon.png : Used to generate names automatically once you have built the hierarchy of grouping levels. Naming rules applied:
    • View without any grouping level ==> List
    • View with only one grouping level ==> Name of the grouping level
    • View with several grouping levels ==> Concatenation of the grouping level names separated by commas, e.g. Manufacturer, Model.

Default View: Used to indicate if the view displayed is the default one when the menu option is selected (box is checked) or not (box is not checked).
    example  The Location view is the default one for the Equipment inventory menu option

Display modes (Note: Only for views with grouping levels): List of all display modes defined for the menu option. The displayed mode is the applied by default when the view is selected, e.g. pie chart, bar chart, etc.

Password close icon.png: Used to define view access rights by profile.

Existing views: List of all views defined for the menu option. To display a view, select it from the drop-down list and click Select ok icon.png.

Available Fields

List of fields from the parent query associated with the view and other manually added fields.

Preview section

Drill-down (Note: Accessible once you have defined a field in the List Mode section): List of fields defining the hierarchy of grouping levels.

  • The field at the top of the list is the highest grouping level. The field at the bottom of the list is the lowest grouping level.
  • To add a grouping level, click and drag the field you want from the Available Fields section to the Drill-down section.
    • There is no limit to the number of grouping levels you can define.
    • If no grouping level is defined, the view is displayed in List mode.
    • In the case of tree fields, only a Last Level field can be defined as a grouping level.
  • To arrange the hierarchy of grouping levels, click and drag the field up or down within the Drill-down section.
  • To delete a grouping level, click and drag the field you want from the Drill-down section to the Available Fields section.
     

List Mode section: List of fields displayed as columns in the last-level display of the view.

  • To add a column, click and drag the field you want from the Available Fields section to the List Mode section.
  • To arrange the columns, click and drag the field up or down within the List Mode section.
  • To delete a column, click and drag the field you want from the List Mode section to the Available Fields section.

Configuration of a field

Used to define how you want to display fields in the last-level display of the view.
         View - alert.png

Access: Click Tools icon.png next to the field

Group by (Note: Only for Date fields): Used to define how records should be grouped.

example  You want a quick view of all equipment whose warranty expires in 2015:

  • End of Warranty field = 9/1/2015 
  • Grouping By Year = 2015

Start of the Path/End of the Path (Note : Only for a tree field which it is not a last level: Used to select the levels to be displayed. * The default 0 value is used to display all grouping levels in the hierarchy.

example Display the Location tree field = North America/USA/New-York/Manhattan/Broadway

  • Start = 0, end = 0 ==> North America/USA/New-York/Manhattan/Broadway
  • Start = 1, end = 3 ==> USA/New-York/Manhattan
  • Start = 4, end = 5 ==> Manhattan/Broadway
  • Value Location (Last Level) = Broadway

Visual alert: Used to define special formatting for a field when its value satisfies certain conditions.  Open url.png See the example.

  • Condition: Expression interpreted when the view is run. It is used to assess whether a visual alert should be applied to the field.
    A condition is made up of the following:
    • An operator: =, <, <=, >, >=, <>
    • A textual expression corresponding to one of the field values to check and/or an environment variable.
      • Availables variables: today ==> Today; now ==> Now (current date/time)
      • Variables can be combined with values and operators
      • You should place the values to test within quotes

example

  • Equipment Status field: condition ='Out of Order'
  • Priority field: condition >=3
  • Urgency field: condition '1 - High'
  • Incident: Creation Date field: condition today ==> find all incidents created today
  • Equipment: Installation Date field: condition today-20 ==> find all equipment installed 20 days before the current date
  • Action - Scheduled Start field: condition >now ==> find actions scheduled after the current time
  • Background Color: Bullet color located in front of the field value. By default, White. You can selected it from a color palett or you can enter the hexadecimal code.
  • Font: Text font, e.g. Arial or Times New Roman applied to the field value. By default, the Web browser font.
    • All fonts supported by the Web browser are available.
    • You can concatenate the font name and size by separating them with a comma.
               example  Arial, 10
  • Style: Font style applied to the field value. By default, Normal. Click to select the style you want.
  • Preview: Preview the formatting of the field in the last-level display of the view when the condition is satisfied.
  • Delete icon.png : Used to delete a row from the alert.

Procedure and Wizards

How to create a view and check its workability

Step 1 (optional): Adding missing fields in the parent query.

Note: Your profile must be authorized to modify views.

1. Go to the screen for which you want to create a view, in List mode.

2. Click Tools icon.png in the top banner and select the Edit option.
The fields list will be displayed.

3. Add the fields you want. Open url.png See the procedure How to modify a parent query.

4. Click Save.
You will return to the screen in List mode.

Step 2: Creating a new view.

1. Go to the screen in List mode.

2. Select the Edit the view Edit icon.png option from the View drop-down list in the top banner.
The views configuration window will open.

3. Select the method for creating your new view.

  • You can use an existing view:
    • Select the template in the Existing views.
    • Click Select ok icon.png.
      The view configuration will be displayed.
  • You can create a view from scratch:
    • Click Add icon.png.
      • List of fields from the parent query associated with the view and other manually added fields will be displayed in the Available fields section.
      • The Preview section will be refreshed.
       

Step 3: Defining the attributes of the view.

Last-level information of the view

1. In the Available Fields section, click and drag the fields identifying information to the Preview > List Mode section.

2. In the Preview > List Mode section, arrange the order of the columns. To do so, click and drag the fields up or down within the section.

Grouping levels
    Note: You must first place a field in the Preview > List Mode section.

1. In the Available Fields section, click and drag the fields identifying information to the Preview > Drilldown section.

2. In the Preview > Drilldown section, arrange the order of the levels. To do so, click and drag the fields up or down within the section.

Defining formatting for the fields in the last-level display of the view.

1. Click Tools icon.png next to the field in the Preview section.
The configuration window of the visual alerts will open.

2. Enter the information based on the type of the field.

  • Grouping for Date fields: Select the grouping you want.
  • Start of the Path/End of the Path for tree fields: Specify the first and last grouping level.

3. Define formatting of the visual alerts for the fields.

  • Click Add condition.
  • Specify the attributes applicable when the condition is satisfied for the field.
    The Preview area Preview area.png will display the formatting.
  • Repeat the operations for each field you want to highlight.
  • To delete a row from the alert, click Delete icon.png.
  • Click Save.
     

Step 4: Selection profiles authorized to access the view.

Note: By default, all profiles are authorized to access the new view.

1. Click Password close icon.png in the toolbar.

2. In the Visible list, click and drag the non-authorized profiles to the Invisible list.

3. Click Save.
 

Step 5: Saving the view.

1. Enter the name of the view in the Name area.png area.

Best Practice icon.png  Name the view based on the hierarchy of grouping levels (i.e. based on the available fields in the Preview > Drilldown section) by clicking Generate name icon.png.

2. Specify the multilingual labels via View - Multilingual labels icon.png.

3. Save the view depending on the method for creating your new view.

You have created the view from a template

  • Click Duplicate icon.png so that you do not overwrite the template.

You have created the view from scratch

  • Click Save icon.png.

4. Click Close the window.
You will return to the screen in List mode.

Step 6: Checking the correct work of the new view.

1. Select the new view from the View drop-down list.

2. Check the browsing through the hierarchy of grouping levels.

3. Check the data and formatting of the visual alerts of the fields displayed in the last-level display of the view.

 How to enable geolocation using Google Maps

In map-based views, the Google map icon.png icon indicates the location of each site automatically using the label, address, city and country of the location. Information is displayed on maps using a Google Maps API. You are required to have a Google Maps API key.

         Google Maps Geocoding API - Schema.png

Note

  • Service Manager versions later than 2015.201 require a Google Maps V3 API key. Earlier versions require a Google Maps V2 API key.
  • The Google Maps service can only locate static addresses that are specified in advance.
  • You should avoid disclosing your Google Maps API key. This is because the use of the API key is associated with your account. It authorizes you to a specific number of requests. Each request run is counted.
  • Usage limit for the standard Google Maps API: 2,500 free requests per day, 10 requests per second. If you exceed this limit, you must enable billing to increase your usage limit. Open url.png   See Google Maps Geocoding API usage limits .
  • You can check if your limit of daily requests has been reached at any time. Open url.png See the procedure.
  • If you use a proxy for calling the Google Maps service, you must specify {ADMIN} Address: port of proxy to use with Google Maps in Other Parameters.

How to obtain a Google Maps API key

Step 1: Registering the Service Manager app Google APIs Console.

1. Go to the Google Maps Geocoding API page.

2. Click Get a key.

3. Log in to your Google account to access the Google APIs Console.

4. Select the mode for creating the project.

5. Click Continue.

  • A message will appear informing you that the project has been created.
  • A new Credentials page will open.

Step 2: Generating the API key.

1. Enter a name for the API key that will be specific to your server.

2. Click Create.
The key will be generated and displayed.
         Google Maps Geocoding API - Get a key (1).png

3. Copy the key using Google Maps Geocoding API - Copy icon.png then click OK.
The Credentials page will be refreshed.

Step 3: Adding the Google Maps API key to the Apache server configuration file.

1. Open the /Config/smo_config.php file on the Apache server.

2. Modify the line below by replacing the value in yellow.

  • <Your GoogleMaps key value>: The new API key you have copied previously
    Caution: Remember to add the ' ' quote marks.

define ('GOOGLE_MAPS_KEY', '<Your GoogleMaps key value>');

     example

define ('GOOGLE_MAPS_KEY', 'AIzaCyDq6C6oa93gvZHKNbABAf4dyIjfdjz4h7WL');

Step 4: Checking the correct work of the Google Maps API key.

1. Run the URL below by replacing the values in yellow.

  • <Your GoogleMaps key value>: The new API key you have copied previously
  • <Location to geolocate>: The location to be checked.
     

https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=<Location to geolocate>&key=<Your GoogleMaps key value>

     example  Check the correct work for Boston location

https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=Boston&key=AIzaCyDq6C6oa93gvZHKNbABAf4dyIjfdjz4h7WL

2. Check that the status returned at the bottom of the page by the geolocation request is OK.
         Google Maps Geocoding API - Status OK.png

    List of possible statuses:

  • OK: No error occurred. The address was analyzed and one or more items of geocoding data were found.
  • ZERO_RESULTS: The geocoding was successful but no results were returned. This can happen if the address parameter specified does not exist.
  • OVER_QUERY_LIMIT: You have exceeded your usage limit.
  • REQUEST_DENIED: Your request was rejected.
  • INVALID_REQUEST: An element is missing from the request.
  • UNKNOWN_ERROR: The request could not be processed because of an unknown server error. If you try again, the request may be successfully processed.

How to check quotas

1. Open the Google APIs Console.

2. Log in to your Google account to access the Google APIs Console.

3. Click Open menu icon.png  (1).

4. Select IAM & Admin option then Quotas option  (2).
The number of authorized requests will be displayed in the Google Maps Geocoding API service  (3).
         Google Maps Geocoding API - Quotas.png

5. Click Edit icon.png in the row of the service.
The number of requests run during the day will be displayed.
         Google Maps Geocoding API - Quotas - Update.png

Tags:
Last modified by Unknown User on 2020/04/02 18:48
Created by Administrator XWiki on 2013/03/25 18:18

Shortcuts

Recent changes
•  Service Manager
•  Service Apps
•  Self Help

Glossary

Powered by XWiki ©, EasyVista 2020