...
This article describes how to build folder structures ('virtual' folders') in product version 4. The new folder structure replaces the familiar subfolders from of version 3.3. The new structure is based on the configuration of each context folder.
You configure the folder structure in a text file in the designer. In future versions, a graphical tool will make configuration simplereasier.
The client 4.x gets the folder structure by requesting the new microservice named Structure Service.
...
Beginning with version 4.3, a testing tool is available to help you validate structure configurations. For more information, refer to the testing tool documentation.
Standard
...
Structure
If no individual folder structure configuration is given for a folder, the standard structure offers the 'structure elements' (German: Strukturelemente) as shown in the client:
...
Code Block |
---|
[ { "title" : "All objects", "title_locales" : { "de":"Alle Objekte", "es":"Todos los objetos", "fr":"Tous les objets", "it":"Tutti gli oggetti", "pt":"Todos os objetos", "ru":"Все объекты", "zh":"所有對象" }, "key" : "Types", "field" : "type", "expanded" : true, "showempty" : true }, { "title" : "Edited by me", "title_locales" : { "de":"Von mir bearbeitet", "es":"Editado por mí", "fr":"Edité par moi", "it":"Modificato da me", "pt":"Editado por mim", "ru":"Отредактировано мной", "zh":"由我編輯" }, "key" : "ModifiedByMe", "condition" : "modifier=#CURRENTUSER#" }, { "title": "Editors", "title_locales" : { "de":"Bearbeiter", "es":"Editores", "fr":"Éditeurs", "it":"Editors", "pt":"Editores", "ru":"редакторы", "zh":"編者" }, "key": "Modifier", "field": "modifiertitle" }, { "title" : "Modification range", "title_locales" : { "de":"Bearbeitungszeitraum", "es":"Rango de modificación", "fr":"Plage de modification", "it":"Gamma di modifica", "pt":"Faixa de modificação", "ru":"Диапазон модификации", "zh":"修改範圍" }, "key" : "ModifiedRange", "method" : "daterange", "field" : "modified" } ] |
List of structure terms
Term | Description | ||||||
---|---|---|---|---|---|---|---|
[ ] | mandatory | Opens and closes the whole folder structure configuration. Use JSON syntax for arrays. | |||||
{ } | mandatory | Opens and closes the configuration of a node, as well as each subnode. Use a comma ( , ) to separate sets of curly brackets ( { } ). Use JSON syntax for objects. | |||||
key | mandatory | There is a unique key for each level in the tree. It is used to reference the results in the structure tree. | |||||
title | mandatory | The label for the key. | |||||
field | optional | The contents of the index field referenced here are displayed as subfolders in the structure. The value of 'field' can be the technical name of general object attributes (see chapter 'List of general object attributes') or of individual index data with the format 'technical and normalized name of object type'.'technical name of index field' (qualified technical name). If the field is one of an abstract object type, all objects of the derived object types are shown in the corresponding list of objects.
| |||||
type | optional | Use 'type' to filter for a specific type. All elements provided in the result are instances of this type. | |||||
condition | optional | Use 'condition' to filter objects. For more information, see the chapter 'Condition grammar' | |||||
method | optional | Use 'method' to aggregate objects in the following ways:
|
|
|
If 'method' is not |
defined, the default is 'count'. The aggregation will count the objects referenced by 'field'. | ||
size | optional | For count aggregations, the structure service returns the first 10 |
results. If you want more results, you can set a higher |
limit (e.g., 10,000), for example if 'showempty' is used and there are more than 10 structure elements. Note: A higher |
limit can decrease the performance of the aggregation. It is not recommended to set a high |
limit on each structure element definition. The size property can only be used if the method is 'count'. If the field reference is a catalog, it is not |
necessary to set the size in the structure element definition. The size is automatically set to the number of possible elements in the catalog. But it is still possible to override this behavior by setting a size. | ||
folder | optional | To set up subfolder structures |
hide | optional | A boolean that can be used to hide a folder from the result. It can be used to "pull-up" all child results. The result folder is always hidden from the result and all child results are shown in the parent result folder of this element. |
expanded | optional | A boolean that controls whether a folder with substructure is shown expanded when the object view is opened. Default is 'false' (not shown expanded). Supported since product version 3.32 |
showempty | optional | A boolean that controls whether a folder with substructure shows all folders, regardless of whether an object can be found for it. Default is 'false' (no empty folders are shown). This property can only be used, if the possible child elements are known. The element must have a field property. The child elements are known if a fixed catalogue is used, the 'type' field is used, or if a 'showemptylist' property is provided for a string field. |
showemptylist | optional | 'showemptylist' can be used for fields |
of type catalog and string. If |
used, the elements of the list are shown even if no object with the value is given. If such an element is marked in the structure tree it is offered within the create object menu and preset in the create form. In case of a |
field of type catalog the list values must be the data values of the catalog.
Supported since product version 4.10 | ||
hideempty | optional | A boolean that controls whether a node folder element is shown if all child elements are empty. If set to 'true', the node element is hidden from the result, if the |
number of objects - the aggregations - |
is zero. If at least one child element is available, the folder element is shown. The property 'showempty' controls the |
behavior for empty child elements, while the property 'hideempty' controls the |
behavior of the parent element. Supported since product version 4.12 | |||||||
contextcondition | optional | The element is only visible, if the context folder condition matches.
Hint: If a contextcondition is used, the service |
will carry out an additional call to |
Eleasticsearch to resolve the index data of the context folder. If used |
too often, this will decrease the performance. Supported since product version 4.12 | ||
sort | optional | If an aggregation of a field is |
built by using the field property and the default method 'count', the results are sorted by relevance returning the most frequently used terms first. This |
behavior can be changed by using the 'sort' property. |
'count' (default), the most frequently terms are returned first. |
sorted alphanumerically by the user interface title. If a catalogue is used for the 'field' property, the sort property can also be set to 'catalogue', In this case, the return is sorted by the designed order of the catalogue entries.
Supported since product version 4.12 |
List of general object attributes (term: 'field')
technical name | English name | Description |
---|---|---|
created | Created | Date of object creation. |
creatortitle | Modified | ' |
Last name, |
First name' of creator. | ||
filesize | Filesize | Size of the content in bytes. |
mimetypegroup | File type | Group of files whose extension references one application. Examples: pdf, word, excel, image |
modified | Edited | Date the object was last edited. |
modifiertitle | Editor | ' |
Last name, |
First name' of last editor. | ||
version | Version | Current version number (count starts with 1). |
Condition grammar
The structure definition term "condition":"<condition grammar>" is used to define a search filter. This section describes the tokens used.
Token | Use | Description | |||||
---|---|---|---|---|---|---|---|
#CURRENTUSER# | Placeholder | During runtime, the logged-in user name is used for filtering | |||||
#CURRENTYEAR# | Placeholder | During runtime, the current year is used for filtering | |||||
#LASTYEAR# | Placeholder | During runtime, the last year is used for filtering | |||||
#TODAY# | Placeholder | During runtime, today is used for filtering | |||||
#YESTERDAY# | Placeholder | During runtime, yesterday is used for filtering | |||||
#THISWEEK# | Placeholder | During runtime, this week is used for filtering. Example:
| |||||
#LASTWEEK# | Placeholder | During runtime, the last week is used for filtering | |||||
#THISMONTH# | Placeholder | During runtime, this month is used for filtering | |||||
#LASTMONTH# | Placeholder | During runtime, the last month is used for filtering | |||||
YEAR | Modifier | A field modifier that can be used on datetime or date fields. It provides access to the year value of the field.
| |||||
PARENT | Modifier | A field modifier that can be used to resolve a hierarchical |
catalogue node. |
nodes with the value Europe which may be its countries:
It can be used |
for catalogue fields. The parent node itself is always included. | |
= | Operator |
Comparing equability.
| |||||||
!= | Operator | Compares two values. Result is true if they are not equal.
| |||||
< | Operator | Compares two values, result is true if first value is less than second one.
| |||||
> | Operator | Compares two values, result is true if first value is greater than second one.
| |||||
AND | Operator |
Logically combines two terms.
| |||||
OR | Operator |
Logically combines two terms.
| |||||||
null | Value | Without value.
| |||||
false | Value | For comparing Boolean fields.
| |||||
true | Value | For comparing Boolean fields.
| |||||
[0-9] | Value | Integer value.
|
Configuration
...
Examples
This chapter explains the configuration syntax step by step.
...
The configuration is based on JSON syntax. The definition begins and ends with square brackets [ ]. Inside the brackets are lists, enclosed in curly brackets { }, of parameters defining the node attributes. The first example defines the smallest shortest configuration with only one node. This node offers access to a list of all objects within the context folder.
...
'Unplugged' - Additional Examples
Vacation
...
Management / Urlaubsverwaltung
The following example shows a configuration for a personnel file. In the file There are two object types for vacation leave management ("Urlaubsverwaltung") in the file. You access the two object types, "Leave available" ("Urlaubsanspruch") and "Leave requested" ("Urlaubsantrag"), under this heading. The next level aggregates the years. Leave requests are aggregated in the next level down using the status catalog. The sum of relevant days for each status type is displayed here. Since there is only one "Leave available" object type per year, no "Business year" is necessary on the additional level.
Following This is an example of the configuration for the leave vacation management only.:
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "title": "Urlaubsverwaltung", "key": "urlaubv", "condition": "type='abwesenheit' OR type='urlaubsverwaltung'", "folder": [ { "title": "Urlaubsantrag", "key": "ulantr", "condition": "abwesenheit.art='Urlaub'", "folder": [ { "title": "Geschäftsjahre", "hide": true, "key": "year", "field": "abwesenheit.geschaeftsjahr", "folder": [ { "title": "Genehmigt", "key": "state", "hide":true, "field": "basicdocument.status", "showempty":true, "folder": [ { "title": "Tage", "method": "sum", "key": "days", "field": "abwesenheit.tage" } ] } ] } ] }, { "title": "Urlaubsanspruch", "key": "ulantr2", "type": "urlaubsverwaltung" } ] |
...