You are viewing the documentation for Blueriq 16. Documentation for other versions is available in our documentation directory.

What is it for?

The AQ_InstanceList is used for displaying a list of instances of a selected Entity. The AQ_InstanceList can contain Attribute and/or Button

The instance list container, sometimes misspelled as instancelist container, shows instances of an entity, and of subtypes of that entity (see Containers for Lists). The container can contain an expression to filter the entities shown. The instances to show can also be filtered by accessing the container through a multi-valued relation (i.e., setting the context for the container).

What goes in an AQ_InstanceList?

You model this container by placing attributes and buttons inside the content section (in addition to filling out parameters, see below). You usually place attributes in the content which belong to the entity chosen at the entity parameter. At runtime, each row of the container belongs to one instance of the chosen entity, and it shows the attribute values corresponding to that instance. While it is possible to have the attributes editable, it is best practice to have them read-only. When adding a button, it is repeated for each instance. When the end user clicks on such a button, the corresponding instance is activated, and you can model a page to edit or delete the corresponding instance (or some other actions that you want to do with the instance).

Headers

Each element in the content of this container corresponds to a column of the container. Each column is preceded by a header text, defined in the headercontainer parameter, if one is set. It is best practice to have the same number of headers as columns. Elements in the header column are handled differently than normal container elements, as follows:

Element typeHeader behavior
AttributeShows the attribute's question text
ContainerShows the container's display text
Text ItemShows the text item's content
Asset

Shows asset text. 

The use of Assets is not recommended. This feature will be deprecated in a future version. 
otherNot supported, shows empty header


Grouping multiple elements in columns

It is possible to add (inline) containers to the content of the AQ_InstanceList. Each container is a single column in the list view at runtime. This allows for styling to be applied to a set of values or buttons. If this is not intended, then you should remove all containers so that all elements are at the highest level in this container.

Parameters

NameDescriptionTypeRequired
referrer-pathAttribute/relation path to determine which instances to show, starting from a particular entity.StringNo
entityName of the entity of which the instances will be shown.StringYes
noinstancecontainerContainer that will be shown when there are no instances to show.StringNo
headercontainerContainer of the header. Please see "Headers" section above for information on the behavior of elements in this container.StringNo
whereclauseExpression to determine which instances to show. Only to be used when the container is accessed through a relation.StringNo
sortattributeAttribute that is used to sort the instances.StringNo
sortorderThe order in which the list will be sorted.“ascending” or “descending”No
sortunknownsaslastWith this setting all unknown values are sorted as last, irrespective if the sorting is ascending or descending.BooleanNo
pagingsizeThe number of entries that you want to display on a single page.IntegerNo


Sorting and paging

At runtime this container will show a paginated list of instances, that can be sorted by the end user. When the list doesn't fit on one page, a search box appears. This box matches the search text with entries in all attribute columns. This means that an instance is shown if the string is present as substring in one of the attribute columns. No wildcards are possible. Searching and sorting does not work on other columns, such as text items and containers.

The instance list container offers a search box. The end user can add search terms and the instance list will be filtered in such a way that only instances that match all search terms will be displayed.

The search box is displayed under certain conditions:

  • In the Material and MVC themes, the search box is visible for an instance list that is not read only.
  • Additionally, in the MVC theme, the search box is hidden when there is only one page of instances.

To display a search box for a read only instance list, you should set the read only flag of the instance list container to FALSE and set the read only flag of all individual attributes to TRUE.

1 Comment

  1. What is the maximum advised number of instances to use an instancelist for?