Downloading Documents
The download functionality enables you to list, download and delete the attachments in an object in an
app.
Attachments in an incident, service request or equipment
- In execute mode:
- Click the name of a document to download it.
- When you click
to delete or when you modify the status of a public/private document,
will immediately be updated.
- The functionality is based on a master-detail relationship between an EasyVista master data source pointing to a list of
objects and an EasyVista detail data source pointing to a reporting parent query for exporting
objects.
Example
Display the list of attachments in an incident
![]() |
![]() |
---|---|
![]() |
![]() |
Notes
- The two export files containing the parent queries used for downloading can be renamed. However, we recommend that you do not modify the filters and views provided.
- All attachments belonging to an
object are automatically displayed in a table. You can use the Data Transformer to modify only the order in which columns are displayed and determine if certain elements, such as the
icon, should be hidden.
Caution
- The downloading of documents is not supported in Safari.
- To implement the download functionality, and only if your
version is prior to 2016.1.267.0, you must import two EXP files to
.
See the procedure.
for downloading documents linked to objects in the _REQUEST and AM_ACTION tables
for downloading documents linked to objects in the other tables
Best practice
- Because the description of documents is often long, you should display it in the last column of the table. This enables users to view other information, such as the document name, author and creation date, without using the horizontal scroll bar.
Procedure: How to implement the document download functionality
1. If your version is prior to 2016.1.267.0, select Administration > Import/Export > Import in the menu to import the two export files below to
.
for the link with the _REQUEST and AM_ACTION tables
for the link with other tables
2. Open the app you want and add an EasyVista data source pointing to a list of the required
objects. Note: This data source defines the master data source.
- List of incidents: Operation > Incidents > All incidents parent query
- List of equipment: Asset Management > Equipment > Inventory parent query
3. Add an EasyVista data source pointing to one of the reporting parent queries used for exporting objects. Note: This data source defines the detail data source.
- Select the filter and view you want.
- Configure the master-detail relationship in the Master/Detail section.
- Master Data Source: Name of the master data source created in step 2.
Master Field: Key of the master data source used to establish the link with the detail data source created in this step. Select the PK (Primary Key) column. - Detail Field: Key of the detail data source. Select the column whose prefix is FK (Foreign Key).
- List of incidents: FK_AM_DOCUMENT_SD_REQUEST_ID
- List of equipment: FK_AM_DOCUMENT_ID
- Master Data Source: Name of the master data source created in step 2.
4. Display the list of objects.
- Add a Data Viewer widget.
- Ensure that it points to the master data source created in step 2.
5. Display the table containing the attachments in the current object.
- Add a Data Viewer widget.
- Ensure that it points to the detail data source created in step 3.
- If you want to delete certain columns in the table or modify their order, use the Data Transformer.
6. Click to switch to preview mode.
- Click one of the
objects.
- Check that the list of attachments is displayed.
- Click
to delete one of the attachments. Open the object in
and check that the attached document is no longer available.