Custom No Data Message
A customized "No Data" message allows the card developer to display information to the users, when no data is returned from the server, so they will have additional information about the missing data. The messages are displayed via the sap.m.IllustratedMessage control.
Properties
Property | Type | Required | Description | Schema Version | Since |
---|---|---|---|---|---|
type | sap.m.IllustratedMessageType | Yes | The illustration type | 1.24.0 | 1.98 |
size | sap.m.IllustratedMessageSize | Yes | The illustration size | 1.24.0 | 1.98 |
title | string | Yes | Defines the title that is displayed below the illustration. | 1.24.0 | 1.98 |
description | string | Yes | Defines the description displayed below the title. | 1.24.0 | 1.98 |
Example
An example with a card which uses custom "No Data" messages in content:
"sap.card": { "configuration": { "messages": { "noData": { "type": "NoSearchResults", "title": "No products are available with your inquiry", "size": "Auto" } } }, "type": "List", "header": { "title": "Products", "subTitle": "In Stock Information", "icon": { "src": "sap-icon://product" } }, "content": { "data": { "request": { "url": "https://services.odata.org/V4/Northwind/Northwind.svc/Products", "parameters": { "$format": "json", "filter": "UnitPrice eq 0" } }, "path": "/value" }, "item": { "title": "{ProductName}", "description": "{UnitsInStock} units in stock", "highlight": "{= ${Discontinued} ? 'Error' : 'Success'}" }, "maxItems": 5 } }Try it Out