Available since Beta 4
Use this strategy to get viewentries (column values) from the view. This is the fastest way to get data from the view.
databaseName(String databaseName): name of the database to read data from, use "
server!!path/database.nsf" format; when omitted, current database is used
viewName(String viewName): name of the view; mandatory
- keyVariableName(String keyVariableName): name of the variable name in route to read value from; mandatory
Let's assume our database has view called
mapJson expects to get programmatic name of the column,
json name and
type (allowed types are STRING, DATETIME and DOUBLE, for multi-value columns use ARRAY_OF_STRING, ARRAY_OF_DATETIME and ARRAY_OF_DOUBLE).
If programmatic name contains
$, you must escape it:
You can also use
@unid to get universal id of the documents corresponding with the viewentries.
count: number or records to return, default is 10
start: position in the view to start from, default value is 1
With route defined above, URL
will return /category/test?start=5&count=7
7 viewentries (column values) under category
"test" from view
By Category starting at position