OpenWGA 7.10 - Query languages reference
GeneralThis query type shows the contents of a Lotus Domino view in a custom Lotus Domino database. The result is either all documents in this view or documents filtered for special values in sorted view columns. The result is also returned in the sort order that is configured for the view.
SyntaxThere are some variants of syntax for this type. The simplest syntax needs only the name of a view to query:
If the view contains sorted columns (which is defined in the view configuration) you can filter the view for values in this column, using the following schematic syntax:
This syntax has three parts divided by a semicolon:
- The view name
- A list of key values, separated by pipe symbols. Each key value is used to filter values in a sorted view column. The first value for the first sorted column of the view, the second value for second sorted column and so on
- A "exactMatch" flag, which should be either "true" or "false". When choosing true you will get documents whose sorted column values must match the given key value exactly. When choosing false you also get all documents whose sorted column values only begin with the given key value. So a key value of "de" would also match column values "de", "de-DE", "de-AT" and so on.
Another example using two key values and needing an exact match on both:
"Columns only" mode
The column values for a document in the view are not available on normal queries. You can however enable the "column only" mode of view searches by adding the term "columnOnly" to query attribute "options":
<tml:query type="view" options="columnsOnly">vwPersons;Burg|Mustermann;true</tml:query>
This will let the query only return the values of the view columns for each document. Those columns are available as items with their column names (lowercased, spaces replaced by underscores "_") as item names. This mode will also return entries which are not based on regular documents, like category and total entries.
Additionally the following item names are available to further inspect the type of the view row and its data:
- id: The Note Id. As WGA uses this as struct key a context change to this ID will go to the originating document of the view row.
- unid: The universal id
- searchscore: The fulltext search score, if a fulltext filter was used
- indentlevel: The indendation level of the entry in the view
- columnindentlevel: The indendation level of the document in its column
- iscategory: Is true if the entry is a category
- isdocument: Is true if the entry is based on a regular document
- istotal: Is true if the entry is a totals line
Data returned by formula language will not represent the actual document in this mode. For example: Evaluating @DocumentUniqueID will not return the UNID of the document on which the view row is based but some internal ID.