Search Filter

Experimental feature since version 1.98. The API may change.

The Search filter allows users to enter text to search or filter for specific data. The search is triggered after the user presses the Search button.

Properties

Property Type Default Value Required Description Schema Version Since
value string "" No The initial value of the filter. 1.38.0 1.98
placeholder string The word "Search" in the current local language (if supported) or in English No Text shown when the filter value is empty. 1.38.0 1.98

Filters Model

The following values are available for filter of type "Search":

Path Description
{filters>/keyOfTheFilter/value} The current value of the filter.

Examples

A filter for product category is defined and later used inside a data request.

{
	"sap.card": {
		"configuration": {
			"filters": {
				"searchQuery": {
					"type": "Search",
					"label": "City",
					"placeholder": "Enter a city"
				}
			},
			"destinations": {
				"Northwind_V4": {
					"name": "Northwind_V4",
					"label": "Northwind V4 Service URL",
					"defaultUrl": "https://services.odata.org/V4/Northwind/Northwind.svc"
				}
			}
		},
		"data": {
			"request": {
				"url": "{{destinations.Northwind_V4}}/Customer_and_Suppliers_by_Cities",
				"parameters": {
					"$filter": "contains(City, '{filters>/searchQuery/value}')",
					"$count": true
				}
			}
		},
		"type": "List",
		"header": {
			"title": "Customers and Suppliers",
			...
		},
		"content": {
			...
		}
	}
}
Try it Out