Search fields

For each case a set of search fields can be configured. These fields will be displayed on top of the case list page within a search element. Search fields add the ability to filter cases that are displayed in the paginated list. Each search field adds the ability to filter on a specific field from the case data. This enables users to combine search fields to get the best result in the case list.

Configuring search fields

An administrator is able to add, change, remove, reorder and download a file with all search fields.

  • Go to the Admin menu

  • Go to the Cases menu and select the case to configure search fields for

  • Select the Search fields tab

Available actions

  • Create Because each case holds its own set of data, search fields can be configured per case. A button to create a new search field is available at the top of the displayed search field list. A modal for filling in the data will be presented when clicking on this button. It is necessary to fill in all the required data to enable the submit button. The key field is specific identification data, so if the key is not unique, you will not be able to save the search field.

Modal to configure search field
  • Edit When clicking on an entry in the list of search fields, a modal opens with the fields pre-filled with the selected item's data. It is possible to edit all the fields, except for the key. When clicking submit, the field data is automatically updated in the list.

Modal to configure search field - prefilled
  • Reorder At the far right next to the 3 dotted menu there are two arrow buttons for reordering the data. The line will be moved in the corresponding direction by clicking the up or down arrow button. When there is no possibility of moving the line, the reorder buttons will be disabled.

  • Delete At the far right of each search field in the list there is a menu under 3 dots. This menu contains the delete option. When deleting a confirmation is shown with the information that this action can't be undone.

  • Download A download icon is available next to the Add search field button at the top of the list. A JSON formatted file with all the information in the list will be downloaded.

Search field types

Overview of available configuration fields and the corresponding field types.

Search field
Available types
Editable
Description

Title

Text

Editable

The title is an optional field that appears as the label in the search field case list UI

Key

Text

Not editable

This field needs to be unique within the case, submission will be prevented if duplicates are found

Path

Text

Editable

The path input gives access to the data fields and meta data of the case. These can easily be identified by their prefix:

  • Case data can be targeted by using the doc: prefix

  • To target the meta data of the use the case: prefix

Data type

Text Number Date Date and time Boolean

Editable

Select the correct data type for the best UI experience on the data fields that are configured. In the end, everything is stored as text in JSON but by setting the correct data type a date input can be a date picker and the input can be validated.

Field type

Single Range Multi select dropdown Single select dropdown

Editable

Fine tune the search with the field type. Change the search field UI from Single text input to Ranged input or set a single or multi select dropdown.

Match type

Exact Contains

Editable

This lets you configure the behavior of the search. Selecting Exact will only give results when the exact match is made and selecting Contains will return the results where the input matches part of the data.

The Title field is not mandatory and if left blank a translation of the key will be shown if configured. Each title follows this logic:

  1. Show the title if available

  2. Get the translation for the key if available

  3. Display the key

Example configuration for doc: and case: prefixes\

Path: case:assigneeFullname This path targets the assigned case handler's full name and will search that field when used in the UI. Path: doc:request.budget This path targets a property in the case data. The doc: prefix directs to the content object of the case document so the same JSON paths can be used as where used in the Form.io forms to gather the data.

Using search fields

Configured search fields can be found on the list page of every case type. So in order to find the search fields click on Cases in the menu and then select a specific case.

The Search fields are located right above the case list columns.

Case list screen - Search collapsed

Click on the search bar to expand the view showing all the configured search fields.

Case list screen - Search expanded

Access control

Access to the search fields can be configured through access control. More information about access control can be found here.

Resources and actions

Resource type
Action
Effect

com.ritense.document.domain.impl.searchfield.SearchField

view_list

Allows viewing search fields

Examples

Permission to view all search fields
{
    "resourceType": "com.ritense.document.domain.impl.searchfield.SearchField",
    "action": "view_list",
    "conditions": []
}
Permission to view all search fields of one specific case type
{
   "resourceType": "com.ritense.document.domain.impl.searchfield.SearchField",
   "action": "view_list",
   "conditions": [
      {
         "type": "field",
         "field": "id.document_definition_name",
         "operator": "==",
         "value": "evenementenvergunning"
      }
   ]
}
Permission to view one specific search field
{
   "resourceType": "com.ritense.document.domain.impl.searchfield.SearchField",
   "action": "view_list",
   "conditions": [
      {
         "type": "field",
         "field": "key",
         "operator": "==",
         "value": "first-name"
      }
   ]
}

Last updated