External Commands
The Directory widget supports several external commands to enhance interactivity and navigation:
Navigation Commands
These commands allow users to move between pages within the directory:
- Next Page – Moves to the next page (if navigation is enabled).
- Previous Page – Moves to the previous page (if navigation is enabled).
- Go to Page – Jumps to a specific page, provided it exists and navigation is enabled.
Sorting Commands
Control how directory entries are sorted:
-
Set Sort By – Defines which field is used for sorting.
- Available options:
First
Second
Third
Fourth
- Available options:
-
Set Sort Order – Specifies the sorting order.
- Available options:
original
(Aliases:default
)originalReversed
(Aliases:reversed
,originalReversed
)abc
(Aliases:asc
,ascending
)abcReversed
(Aliases:cba
,desc
,descending
,abcreversed
)
- Available options:
Search and Filtering Commands
-
search
This is used to search through the widget entries or the datasource entries.-
Parameters:
query
: Search query (can be string or object depending on search type)
-
Behavior:
- In
simple
mode, the widget performs a search across predefined, selected fields. - In
complex
mode, the widget searches through explicitly defined properties. It also supports advanced queries using JSON-based expressions.
- In
Complex Search Syntax
When using
complex
mode, thequery
parameter can be a structured JSON object to perform logical searches:- Keys must correspond to actual property names in the datasource.
- Each value defines the condition to match. It can be:
- A single value
- An array of values (interpreted as
OR
between values) - An object with advanced matching options
- Reserved logical keys:
AND
(implicit at the root level)OR
(used for grouping alternative conditions)
By default, all top-level properties are evaluated using an
AND
condition.
You may nest anOR
condition using theOR
key for alternate matches.-
Example 1: Simple object structure
{
"name": "Péter",
"OR": {
"birthYear": 2003,
"workplace": "Wallboard"
}
}This is interpreted as:
name === "Péter" && (birthYear === 2003 || workplace === "Wallboard")
-
Example 2: Array of values
{
"name": ["Péter", "John"],
"OR": {
"birthYear": 2003,
"workplace": "Wallboard"
}
}This is interpreted as:
(name === "Péter" || name === "John") && (birthYear === 2003 || workplace === "Wallboard")
-
Example 3: Advanced field matching
{
"name": {
"value": "Péter",
"behavior": "exact",
"caseSensitive": false
},
"OR": {
"birthYear": 2003,
"workplace": "Wallboard"
}
}This query behaves the same as Example 1, but provides fine-grained control over how the name field is matched.
Supported advanced field options:
value
: The actual value to search for. (This is required)behavior
: Matching behavior (exact
,includes
,startsWith
,endsWith
,regex
)caseSensitive
: Whether the match should respect letter casing.
You can apply these advanced option per field, anywhere in the query object, even within nested
OR
arrays. -
- jumpTo
When the navigation is disabled, then it scrolls to the first appearance of the search term.- Parameters:
query
: Search query (only can be string)
- Parameters:
- clearSearch
This is used to clear the current search value to show everything according to settings.
- resetSearch
This is used to reset the current search settings back to the initial behavior.
- setSearchBehavior
This is used to update the search behavior while the widget is running.- Parameters:
query
: Search behavior (can be 'includes' or 'startsWith' or 'endsWith' or 'exact', 'regex')
- Parameters:
-
setSearchProperties
When the search type is 'simple' then with this you can update the Fields what the widget will use for search.
If the widget type is 'complex' then with this you can update the properties list what the widget will use for search.If you want to set multiple properties, then each property or field name need to be separated with a comma:
,
Example: You want to set the search for the First and Second field, then the query need to be: "First,Second"
- Parameters:
query
: Search properties (needs to be string)
- Parameters:
- setSearchType
Update the current search mode.
Set it to simple or complex.- Parameters:
query
: Search type ('simple' or 'complex')
- Parameters:
Worksheet Commands
These commands will only work if the datasource type is set to 'Table'
- selectWorksheet
Select a worksheet in the datasource.- Parameters:
worksheetName
: Worksheet name in the datasource.
- Parameters:
- selectDefaultWorksheet
Select the default worksheet in the datasource.
It's whether the predefined default or the first available worksheet.