To be able to display a list of files, the AQ_InstanceList container is can be used. The AQ_InstanceList container replaces the AQ_InstanceSelector(Plus) and has improved features like a search box and paging.
Step-by-step guide
This How-to will show you how to create and use the InstanceList in combination with a multiple file upload.
More details about the multiple file upload can be found here: How to handle multiple files
Configuration
Not applicable
Create an AQ_InstanceList container
Follow the steps below to model a list of files.
Create an entity and attributes
- Create an entity with the name 'File'
- Create the following attributes:
- ID (String
- Name (String)
- SizeIn KB (String)
- UploadDate (Datetime)
Create a delete button and an event
- Create a delete button.
- Create a delete event.
Create a download container
- Create a File Download container, see AQ_File_Download
Parameters Download container
Connection: the name of the connection
FileID: the id of the file that is downloaded by this container
ButtonText: Displays this text on the download button
ButtonPresentationStyle: adds this presentation style to the download button
Create table headers
To create a nice-looking table with the proper headers create a new Container e.g. 'Headers'
In this container add the required assets for the column names.
Create the AQ_instanceList container
Create a container with container type AQ_InstanceList
- In the containment include the attributes you want to display (in the body)
- Insert the delete button.
- insert the download Container (optional)
These parameters are used for this how to. See also AQ_InstanceList
Parameter | Value |
---|---|
entity | File |
noinstancecontainer | NoItems |
headercontainer | Headers |
sortattribute | FileUploadDate |
sortorder | descending |
pagingsize | 5 |
Create a page
Create a page (eg. StartPage) to display your list of instances
Create a flow
Create and expose a flow to view your project in Runtime.
- insert your page (StartPage)
- connect the delete service
- expose and save the flow
View the runtime application
Now you are able to view your project and the instance list in the Runtime. In the standard styling it will be presented as follows:
- Search box: the search box can be used to find instances. The search will be executed in every column.
- Columns: the columns will be displayed with the headers as you modeled in studio.
- Body: in the body all data will be displayed as well as the download and delete links.
- Paging: on the bottom of the container the paging bar is displayed.
- Sorting: every column can be sorted by clicking the column header.