The list block is used to show one or more list items. Each list item has a type, which determines which Item template is used to render the item. The below example is a list block using a row layout containing 3 items all using the flexible item template:
Each list item can optionally contain item actions. These are actions that can be performed on each item, such as Edit or Delete. See Item actions for more information.
The block accepts these parameters:
|Description||Please remember to check out the details before approving anything.||Instructional text or guidance that appears at the top of each list. This supports HTML tags.|
No items text
|Woohoo, nothing to action!||The text to show when the list has no items. This supports HTML tags.|
|REST data source||workflow-notifications||See Setting the REST Provider in the Document block.|
|Row Grid Mini-grid||Checked Unchecked||Specifies one or more layouts that can be used to render this list. See Item templates for details on which types of items support which layouts.|
|Double-sized grids||Checked Unchecked||This only applies when Grid is checked. When checked, grid items are double their normal size. Leave blank for the default.|
|Bulk action text||Select something:||When bulk item actions are enabled, this is the prompt show in the bulk action drop-down list. It defaults to 'Choose one:'.|
|Include search||noteType, line1||When selected, the list will provide an in-list search facility. You specify the list of attributes that the app will search through to find results. For example, if the list returns purchase order items and includes the property vendorName you can specify this property here to allow a user to search for results by the vendor name. For a list of properties included in the item templates, please refer to Item templates.|
|Include filters||Field: vendorName Title: Vendor Type: Select multiple||When selected, the list will provide in-list filtering. You specify one row per filter that you wish to include. Field: the name of the item property that contains the value to be filtered. For a list of properties included in the item templates, please refer to Item templates.Title: a title for the filter, which is seen by the end-user Type: the type of filter:
|Include sorts||Field: vendorName Title: Vendor Direction: ascending Selected by default: true||When selected, the list will allow the user to specify an alternative sort to the default sort. You specify one row per sort you wish to provide. Field: the name of the item property that contains the value to be sorted. For a list of properties included in the item templates, please refer to Item templates. Title: a title for the sort, which is seen by the end-user Direction: whether to sort ascending or descending. The list will sort according to the item's data type (string, boolean, number, date). Selected by default: select the sort that is the default sort when the list items are returned. Only one sort should have this checked.|
The list items are provided by the contents specified in the REST data source property. Please see Setting the REST API Provider in the Document block for details on setting this parameter.
Using a view to populate the list items
When using the utility REST APIs, the database object linked to the Application Function can simply be a view that selects the item template's type together with the item template specific properties, as illustrated in this example:
For information on available item types and their properties, please see Item templates.
REST API Shape
If you're writing your own REST API, the API should return XML in this format:
<?xml version="1.0" encoding="UTF-8"?> <data xmlns:json="http://json.org/" json:force-array="true"> <item> <type>flexible</type> <itemProperty1>Some value</itemProperty1> </item> <item> <type>flexible</type> <itemProperty1>Another value</itemProperty1> </item> </data>