Views
Definition
A view enables you to consult and format the presentation of information, e.g. grouping of data or page layout.
EndDefinition
- It is built around a parent query that accesses a set of standardized data from the database.
- It can contain grouping levels that break data down.
- Data is grouped and sorted by level. These levels filter data based on hierarchy.
- Information from the lowest level is displayed in a grid with one row for each record.
- It can be combined with a display mode (graphic, board, ...).
See the List mode.
- It can contain visual alerts that highlight fields when their values satisfy certain conditions.
See the example.
- It can use the Google Maps geolocation service to display markers
on a map using information such as the location name, address, city, country, etc.
Types of views
Views in a grid in List mode
- These are associated with menu items.
example The Equipment by Location view is associated with the Equipment Inventory menu item.
See the detailed example.
- Users can select them from the View drop-down list.
Views associated with alerts and reports
- They are components of the object and cannot be used outside this object.
- They do not appear among the views in a grid in List mode, in other alerts or reports.
example Number of Late Incidents This Week report view
Examples
1. The Equipment view is associated with the Equipment Inventory menu item (view in the grid in List mode). It is defined with the following criteria:
- Two grouping levels: Model > Location (last level)
- Three items of last-level information displayed: Type; Asset; Status
How to browse through views (drill-down functionality)
- Select a view ==> First grouping level displayed = All models
- Select a model ==> Second grouping level displayed = All locations where the model is available
- Select a location in the last grouping level ==> Last-level information displayed in a grid = All equipment associated with the model available at this location
Last-level display of the view (last grouping level - List mode)
2. Visual alerts are defined in the Status field:
- Alert for the Out of Order status:
Condition = Out of Order; font = Arial; style = Bold; bullet color = red - Alert for the In stock status:
Condition = In stock; font = Arial; style = Normal; bullet color = green
Last-level display of the view: Colored bullets appear to the left of each status that satisfies the conditions
Notes
- Rights based on the type of view:
- Views in a grid in List mode:
- Only user profiles authorized to edit views can create or modify these views.
See User Profiles > Edit rights and display rights.
- Edit rights for views are assigned for all menus.
- Only user profiles authorized to edit views can create or modify these views.
- Views associated with alerts and reports:
- Users can create or modify these views without any specific user rights.
- Views in a grid in List mode:
- They can add fields manually to a view's parent query irrespective of the view type, as long as they are authorized to edit display presentations.
See User Profiles > Edit rights and display rights.
- Fields are displayed with their alias (or logical name).
- If the alias is not specified, the physical field name will appear.
example
- Alias: Phone, Physical Name: PHONE_NUMBER
- Alias: Serial Number, Physical Name: AM_ASSET.SERIAL_NUMBER
- Views in a grid in List mode:
- Each menu item has a List view for viewing all records at the lowest level.
- Each view has a default display mode.
- Views with grouping levels can be displayed in charts using the Display drop-down list found next to the View list.
- The formatting defined in visual alerts is not printed.
- In the case of tree fields, e.g. location or department, only the last level can be defined as a grouping level.
Caution
- Do not confuse SQL views (used as virtual tables for adding fields to parent queries) with Service Manager views.
Best Practice
- If you want to add fields to the view's parent query, you should do it before editing the view.
See How to modify a parent query.
- To ensure that information is grouped in a meaningful way, you should select fields that can group more than one record 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.
- Name of the view:
- Give the view 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.
- If the value to be specified contains a dash, you should place the value within quotes.
example Condition linked to 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.
- Views compatible with Board display mode:
- Availability of the display mode:
- Board mode is not available if the view is a list or a tree structure with grouping levels such as department or location.
- In the other types of views, the display mode is not available when the number of records exceeds 200. If this is the case, the
icon will appear together with an infotip.
- If the functionality is enabled for the view, you can move cards using drag and drop.
See the procedure (Note: Only for profiles authorized to edit display presentations)
- The functionality is enabled by default for views built using the AM_ACTION table. It is disabled by default for views built using other tables.
- Availability of the display mode:
Characteristics specific to versions 2016 and earlier
The view editor in versions 2016 and earlier is different.
- Views in a grid in List mode: Edit rights are assigned to each user profile in the module associated with the menu item using the view.
See User Profiles.
- By default, records will be sorted using the first column in the view, in ascending order for text and in descending order for dates. Use the Sort property to apply another default sort order to the view.
Access
- Views in a grid in List mode: In any screen in List mode, click Edit View
at the bottom of the View drop-down list (Note: You must be authorized to edit views).
- Views associated with alerts and reports: Via the object's form (Note: No specific user rights are required).
Screens description
(1) Toolbar
: Used to create a new view.
: Used to save the view.
: Used to duplicate and save the view using another name. The entire display of the view is duplicated.
: Used to delete the view.
Name of the view: Name identifying the view.
: Used to enter multilingual labels manually for the name of the view.
: Used to generate names automatically based on the hierarchy of grouping levels in compliance with the naming convention:
- 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 item is selected (box is checked) or not (box is not checked).
example Location view for the Equipment Inventory menu item
Display Modes (Note: Only for views with grouping levels): List of all data display modes defined for the menu item. The default display mode appears when the view is selected, e.g. pie chart, bar chart, etc.
: Used to define view access rights by user profile.
Existing Views: List of all views defined for the menu item. To display a view, select it from the drop-down list and click .
Allow Drag&Drop (Board): When Board display mode is selected for the view, this indicates if you can click and drag to move cards (box is checked) or not (box is not checked).
- The functionality is enabled by default for views built using the AM_ACTION table. It is disabled by default for views built using other tables.
- In views built using the AM_ACTION table, the Undefined value will appear by default if the view has not been modified since the latest version upgrade. Once you modify this view, this value will no longer appear.
Sort: Column used to sort records by default when the view is displayed.
- The sort options, i.e. ascending or descending, will appear once you select a field.
- You can select any of the fields in the view as the default sort column except for Memo fields and Tree fields.
- Select the By Default value to return to the default sort order defined by EasyVista. Records will be sorted using the first column in the view, in ascending order for text and in descending order for dates.
(2) Available Fields: List of fields from the parent query associated with the view and other manually added fields that were not used in the view.
(3) Preview: List of fields used in the view.
- In the Available Fields section, click and drag the field you want to the Drill-down section or the List Mode section.
- Drill-down section: List of fields defining the hierarchy of grouping levels.
Note: The drill-down functionality enables you to zoom in on each grouping level in the view to see the complete breakdown of data at its lowest level.example Display by Status, followed by Manufacturer, Model and Equipment (last level)
- The section is accessible once you have placed a field in the List Mode section.
- To arrange the hierarchy of grouping levels, click and drag the handle of a field up or down within the Drill-down section.
- 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.
- If no grouping level is defined, the view is displayed in List mode.
- In the case of tree fields, e.g. location or department, only the last level can be defined as a grouping level.
- List Mode section: List of fields displayed as columns in the last-level display of the view.
- To arrange the order of columns, click and drag the handle of a field up or down within the List Mode section.
next to a field: In the last-level display of the view, this tool enables you to define special formatting when the value of the field satisfies certain conditions.
See the example and the description.
will appear if display conditions have already been defined.
Configuration of the display of a field
Note:
- The name of the configured field is displayed in the title bar.
- Depending on the type of field selected, e.g. date field, tree field, additional options may appear.
See the procedure.
- 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 text expression corresponding to one of the field values to be tested and/or an environment variable:
- Available variables: today = current date; now = current time.
- Variables can be combined with values and operators.
- The values to be tested must be placed within quotes ('...').
example
- 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 all actions scheduled after the current time
- Background color: Color of the bullet
found next to the value of the selected field. You can specify the color using a color palette or its hexadecimal code.
- Font: Font of the field value.
- By default, it is the font used in your Web browser.
- All fonts supported by the Web browser are available.
- You can specify the font name and size by separating them with a comma.
example Arial, 10
- Style: Font style applied to the field value, e.g. bold, italic, etc.
- You can apply different styles.
- Preview: Preview the formatting of the field in the last-level display of the view when the condition is satisfied.
: Used to delete the condition of the alert.
Procedures
How to create a view associated with a grid
Step 1 (optional): Add fields to the parent query of the view.
1. Select the menu item for which you want to create the new view.
The screen will open in List mode.
2. Click in the title bar and select Edit.
The list of fields from the parent query associated with the menu item and other manually added fields will appear.
3. Add the fields you want. See How to modify a parent query.
Step 2: Create the new view.
1. Select the menu item for which you want to create the new view.
The screen will open in List mode.
2. Click Edit View at the bottom of the View drop-down list.
- The view editor will appear.
- The current view will appear.
3. Click in the toolbar.
- A new view will be initialized.
- The list of fields from the parent query associated with the menu item and other manually added fields will appear in the Available Fields section.
Step 3: Define the structure of the new view.
Last-level display of the view
1. In the Available Fields section, click and drag all visible fields in the last-level display of the view to the Preview > List Mode section.
2. In the Preview > List Mode section, arrange the order of the columns to be displayed in the last-level display of the view.
Grouping levels
1. In the Available Fields section, click and drag the fields for the grouping levels to the Preview > Drill-down section.
2. In the Preview > Drill-down section, arrange the hierarchy of the fields to be displayed as grouping levels.
Step 4: Define the formatting of visual alerts for fields in the last-level display of the view.
1. Click next to the field to be configured in the Preview section.
The window for configuring visual alerts will appear.
2. Specify the options depending on the type of field.
- Grouping (Note: Only for date fields): Select the way you want to group records.
example You want a quick view of all equipment whose warranty expires in 2021:
- End of Warranty field = 9/1/2021
- Grouping By Year = 2021
- Start of the Path / End of the Path (Note: Only for tree fields that are not in the last level): Indicate the first and last level of the hierarchy to be displayed.
- The value 0 is used to display all grouping levels in the hierarchy.
- The value 0 is used to display all grouping levels in the hierarchy.
example Display the tree field, Location = 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
- Location (last level) = Broadway
3. Define the formatting of the field values to be highlighted in the last-level display of the view.
- Click Add Condition.
A row for defining the condition will appear.
- Specify the formatting to be applied when the condition is satisfied for the field.
The Preview fieldwill automatically display the formatting.
- Repeat this procedure for each field value to be highlighted.
See the example.
- Click Save.
You will return to the view editor. Theicon will appear next to the relevant field.
- Repeat the procedure for all field values to be highlighted in the last-level display of the view.
Step 5: Select the user profiles authorized to access the view.
1. Click in the toolbar.
By default, all user profiles are authorized.
2. In the Visible pane, click and drag the user profiles not authorized to access the view to the Invisible pane.
3. In the Invisible pane, click and drag the user profiles authorized to access the view to the Visible pane.
4. Click Save.
Step 6: Save and test the new view.
1. Enter the name of the new view.
2. Click to enter the name in different languages.
3. Click to save the view.
4. Click Close the Window.
- The view editor will close.
- The view will automatically be applied to the screen in List mode.
- It will be added to the View drop-down list and will be accessible to all authorized user profiles.
5. Check that the results are correctly displayed.
6. Check that only authorized user profiles can access the view.
How to enable the drag and drop functionality in a view compatible with Board mode
Step 1: Select the view
1. Open a screen with the view you want in List mode.
2. Select the view.
Step 2: Configure the view
1. Click Edit View at the bottom of the View drop-down list.
2. Select the Allow Drag&Drop (Board) option.
Note: In views built using the AM_ACTION table, the Undefined value will appear by default if the view has not been modified since the latest version upgrade. Once you modify the view, this value will no longer appear.
Step 3: Save and test the drag and drop functionality
1. Click to save the view.
2. Click Close the Window.
You will return to the view.
3. Select Board display mode.
Note: Board display mode is not available if the number of records exceeds 200.
4. Click and drag a card to the position you want.
How to create a view associated with an alert or report
Step 1: Create the new view.
1. Go to the alert or report where you want to create a view.
2. Create the view.
- Alerts: Go to the last step and click Add View (Note: Only for Standard alerts).
- Reports: Click
to add a view and enter its name. Next, click
.
The view editor will appear.
Step 2: Configure the new view.
1. (Note: Only for Standard alerts) Select the menu associated with the alert in the Theme field.
Only recipients of the notification email authorized to access the menu can see this view.
CreateViewAlertReporting_Procedure
2. Define the order of the columns in the view.
- Select the Order box next to the field to be moved.
- Click Insert Here next to the field above which you want to move the selected field.
3. Specify the options depending on the type of field.
- Only for date fields: Select the way you want to group records from the Group by drop-down list.
example You want a quick view of all equipment whose warranty expires in 2021:
- End of Warranty field = 9/1/2021
- Grouping By Year = 2021
- Only for tree fields that are not in the last level: Indicate the first and last level of the hierarchy to be displayed.
- The value 0 is used to display all grouping levels in the hierarchy.
example Display the tree field, Location = 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
- Location (last level) = Broadway
- The value 0 is used to display all grouping levels in the hierarchy.
- Select the measure type you want, i.e. number of records, totals, average.
4. Select the grouping level of the view using the Breakpoint column.
All fields up to this level are marked as Visible.
5. Select the fields you want to display in the view.
EndCreateViewAlertReporting_Procedure
Step 3: Save and test the new view.
1. Close the view.
- Alerts: Click Finish.
- Reports: Click OK.
2. Test the alert or report and check that the view displays the required information.
How to create a view using a template
Step 1: Select the template view.
1. Select the menu item for which you want to create the new view.
2. Click Edit View at the bottom of the View drop-down list.
- The view editor will appear.
- The default view for the menu item will appear.
3. Select the template view from the Existing Views drop-down list and click .
The window for configuring the view will appear.
Step 2: Create the new view.
1. Modify the information as required in the template view. See the detailed procedure.
2. Enter a new name for the view.
3 Click so that you do not overwrite the template.
4. Click Close the Window.
- The view editor will close.
- The view will automatically be applied to the screen in List mode.
Geolocation using Google Maps
In map-based Location views, the marker indicates the location of each site automatically using the location name, address, city and country. Information is displayed on maps using a Google Maps API. You are required to have a Google Maps API key.
Notes
- Geolocation uses a Google Maps API. You are required to have a Google Maps API key.
See the procedure.
- Service Manager versions later than 2015.201 require a Google Maps API V3 key. Earlier versions require a Google Maps API V2 key.
- For on-premises customers, the API key must be configured in the Config/smo_config.php file found on the Apache server. For SaaS-based customers, your request must be submitted to the EasyVista CMC team.
- If the Config/smo_config.php file is not configured, Location views will not appear in the Display drop-down list.
- The Google Maps service can only locate static addresses that are specified in advance.
- To minimize calls between the client workstation and the Google Maps servers, geocoding information is stored on the database once it has been obtained. It is only re-requested in the case of a change of address.
- 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.
See Google Maps Geocoding API usage limits.
- If you use a proxy for calling the Google Maps service, you must specify {ADMIN} Google Maps proxy server port number in Other Parameters.
Caution
- 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.
Best Practice
- You can check if your limit of daily requests has been reached at any time.
See the procedure.
Procedures
How to obtain a Google Maps API key
Step 1: Save the Service Manager app in the Google API Console.
1. Go to the Google API console page.
2. Log in to your Google account.
4. Click the Select a project drop-down list at the top of the screen.
- If you are already using Google APIs, select the project used to manage your apps in the console.
- If you are using Google APIs for the first time, click New project then create the project.
Step 2: Generate the API key.
1. Select APIs & Services > Credentials in the menu pane.
2. Click + Create credentials then API Key.
The generated key will appear.
3. Click Restrict key.
- Define the restrictions (web sites, IP addresses or applications) to prevent unauthorized use of your API key.
- Give a name to the key specific to your server.
- Click Save.
The Credentials page will be refreshed.
Step 3: Add the Google Maps API key to the configuration file on the Apache server.
1. Click to copy the key.
2. Open the /Config/smo_config.php file on the Apache server.
3. Modify the row below by replacing the value in yellow by the new API key you just copied.
define ('GOOGLE_MAPS_KEY', '<Your GoogleMaps key value>');
example
define ('GOOGLE_MAPS_KEY', 'AIzaCyDq6C6oa93gvZHKNbABAf4dyIjfdjz4h7WL');
Step 4: Check the workability 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 just copied.
- <Location to geolocate>: The location to be tested.
https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=<Location to geolocate>&key=<Your GoogleMaps key value>
example Check that the Boston location works
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 geocoding request is OK.
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 API Console.
2. Log in to your Google account to access the Google API Console.
3. Click (1).
4. Select IAM & Admin and click Quotas (2).
The number of authorized requests is displayed in the Google Maps Geocoding API service (3).
5. Click in the row of the service.
The number of requests run during the day will appear.