2.7.3. Search Templates
Users with the Admin and Developer roles can configure search templates to search for documents or tasks in the platform by specifying the required criteria, such as document type, dates, or statuses. The search results will display the columns configured in the template as a grid.
2.7.3.1. Create a Search Template
-
In the navigation panel, select the Studio 1 workspace.
-
Select the Forms and Templates 2 shortcut group, then select the Search Templates 3 shortcut.
-
In the toolbar, select Create 4.
-
Fill in the fields using the hints in the table below.
| Field name | Description |
|---|---|
| Code* |
|
| Name* | The name of the search template. ℹ️ Note: You can set the name of the search template form for different languages. To do this, in the Name field, select the icon and fill in the fields for other languages. Then select the Apply button. |
| Search type* | Select the type of element you want to search for: Documents or Tasks. |
| Description | A short description of the search template. |
Fields marked with "*" are required.
-
Go to the Search Parameters tab.
-
In the Designer 1 mode, drag the required attributes from the attribute panel onto the form 2. The attributes you drag onto the form will become search conditions.
-
Set a default value for the added attributes. To do this, select the attribute 1, then in the Default condition value 2 field, select the required value from the list. This value will be automatically applied each time the user uses this search template. This is particularly useful for frequently used search conditions.
Note:Users will be able to change these values when using the template if they need a different condition than the default.
-
Enable the Condition hidden toggle if you want to prevent users from changing a specific search condition. This will make the condition fixed and invisible to users when the template is applied.
-
Go to the Results Display Settings tab.
-
Configure the display of search results. To do this, drag the required attributes from the attribute panel into the Columns 1, Sorting, or Colors sections, then configure the width and alignment of the added columns 2.
Note:To make it easier to add attributes to the required columns, in the Document Types 1 field, select one or more document types whose attributes you want to see in the attribute panel. You can also enable the With folders 2 toggle and in the Smart folders rule 3 field, select the folder hierarchy in which the attributes will be displayed.
-
Configure the actions that the user can perform on the search results. To do this, select the Configure actions button.
-
Enable the action toggles 1 you want to activate for the user, then select the Save 2 button.
Note:By default, all actions are enabled.
-
In the toolbar, select Save, then, if needed, proceed to the Script section.
Tip:If you select a document type in the search parameters, the attributes used in that document type will be displayed. You can also enable the display of folders and select one of the created folder hierarchies.
After completing the attribute configuration, you can go to the Preview section to check how the attribute will be displayed on the document form.
2.7.3.2. Grant Access to a Search Template
To allow users to use search templates, you need to grant them access. To do this, follow these steps:
-
In the navigation panel, select the Studio 1 workspace.
-
Select the Forms and Templates 2 shortcut group, then select the Search Templates 3 shortcut.
-
Select the required template, then double-click it 4.
-
Select one of the available methods:
Method 1: Using the button on the top panel
a. In the top panel of the form, select the Permissions button.
Method 2: Via the settings menu
a. To open the settings menu, select the icon in the top right corner of the form 1.
b. From the expanded menu, select Permissions 2.
-
In the opened window, select the + icon in the toolbar.
-
In the Subject field, select one of the following options:
-
Administration subjects — can be user groups A, roles B, or users C.
-
Organizational units — can be our organizations A, departments B, positions C, or executor groups D.
-
-
From the dropdown lists, select the relevant groups, roles, users, organizations, departments, positions, or executor groups you want to grant access to this search template.
-
In the toolbar, select Save.
2.7.3.3. Search Documents/Tasks Using a Template
-
In the navigation panel, select the Documents workspace.
-
Select the Search shortcut.
-
In the Search template A field, select the required template or create a new preset by selecting the New template B button, then filling in the required fields using the hints from the Create a Search Template section.
Note:A user will only see the templates they have access to (see the Grant Access to a Search Template section).
-
Enable the Presets 1 toggle if you want to use a previously created preset, then select the required preset 2 from the list. The Value fields will then be filled in automatically according to the values you saved in the preset. (To create new presets, see the Presets section.)
-
Fill in the condition fields 1 and the Value 2 fields.
Example: The filter condition for the "Author" column is "Equals", and in the Value field for this column, you specify a particular user. Accordingly, the template will search only for documents or tasks where the author is the specified user.
Note:If the Default condition value toggle was enabled when creating the search template, the condition fields will be filled in automatically. Also, if you used the Presets feature in the previous step, the Value fields will also be filled in automatically.
Note:When selecting search conditions for Date type attributes and role-based attributes, macros are available (see the Macro Formatting section).
The search results will display the documents that match the specified conditions. If you need to change the search conditions, select the Edit search parameters button in the toolbar.
2.7.3.4. Presets
Search template presets are saved values for search conditions that help you apply changes to search conditions more quickly. Presets are used as an additional element of a search template.
Example: In a search template, you set the search condition "Author" — "one of". Accordingly, in the Value field you need to specify particular platform users, one of whom must be the document author for the document to appear in the search results. Presets allow you to create value templates that can be reused if you frequently apply the same conditions for searching.
2.7.3.4.1. Create Presets
Presets are created per user. This means that created presets are only available to the user who created them.
-
In the navigation panel, select the Documents 1 workspace, then select the Search 2 shortcut.
-
In the Search template field, select the required template 1, then enable the Presets 2 toggle.
-
Fill in the search condition field 1, then fill in the Value 2 field.
-
In the Preset name 1 field, enter the desired name, then select the Save icon on the right 2.
After saving the preset, you will be able to select it in the Saved presets field in any search template.
2.7.3.4.2. Apply a Created Preset
-
In the navigation panel, select the Documents 1 workspace, then select the Search 2 shortcut.
-
In the Search template field, select the required template 1, then enable the Presets 2 toggle.
-
In the Saved presets 1 field, select the required preset, then select the Search 2 button.