This procedure described how to build user interface definitions and functionality around files that have been transferred to the Agentry Client and/or attached to objects locally. The Agentry Client does not display files directly within the client interface, nor does it provide a means to edit these files to the user. However, the files can be displayed in an application for the file type, provided that application has been installed and is associated with the file type on the client device.
To list the files attached to a parent object, a list screen or one of the list types of detail screen fields can be used. The definition of these lists is the same as for the display of any other collection property. The collection is selected to be listed, and the properties from the object type within the collection are selected for display in columns for fields.
In this procedure a list is defined to display a collection of file objects. An action is then defined and a button is added to execute that action that displays the file currently selected in the list. This is accomplished with the definition of an action step of type Windows Command. This type of action step is used to execute commands on the client device. If the path to a non-executable file is defined as the command for the step, the Windows OS will execute the application associated with that file type and open the specified file.
In the example used in this procedure, the module data structure is Customers -> Documents, where Documents is a collection of Document objects to encapsulate the files attached to Customer objects. A screen set to display details of a selected Customer object is already defined and includes detail screens for the other properties of the Customer object. It is to this screen set, named ShowCustomerDetails, that the list screen will be added. The functionality to be implemented includes a list screen with columns displaying the name of the file stored on the client, and another to display the fill file path. On this list screen an action can be executed via either a double-click of an item in the list, or via a button click that displays the selected file in the application associated with its type.
Note that similar behavior can be defined to list the Documents object using other list controls available in Agentry, including List Tile View fields and List View fields, or any display definition that lists collections.
Once this procedure is complete, a list of the file objects for a given parent object is defined. An action also exists that allows the user to display the selected file in the application on the client device associated with that file type.