popupElement
Popup elements allow users to author popups, using multiple elements such as tabular views, string description, media (charts and images), expressions and attachments and control the order in which they appear. Specifically, popupElements do the following: 1) provide the ability to explicitly add a field/ value table in addition to a description, 2) allow adding multiple description elements, and 3) allow a user to author and consume elements of a popup in the order of their choosing.
Referenced by: popupInfo
Properties
Property | Details |
---|---|
attributes | A dictionary of key value pairs representing attributes to be used instead of fields and their values. This property is only used when the element is of type expression and should be returned as part of the arcade expression itself. This property allows passing arcade derived attribute values into fields or media elements. More details can be found here. |
description | An optional string value describing the element in detail. This property does not apply when the type is text or expression . |
displayType | This property applies to elements of type attachments . A string value indicating how to display the attachment. If list is specified, attachments show as links. If preview is specified, attachments expand to the width of the pop-up. Setting the value to auto allows applications to choose the most suitable default experience for their application. Valid values:
|
expressionInfo | This property applies to elements of type expression . An Arcade expression that defines the pop-up element content. The return type will always be dictionary as outlined here. |
fieldInfos[] | This property applies to elements of type fields . It is an array of FieldInfo objects representing a field/value pair displayed as a table within the popupElement. If the fieldInfos property is not provided, the popupElement will display whatever is specified directly in the PopupInfo.fieldInfos property. |
mediaInfos[] | This property applies to elements of type media . An array of MediaInfo objects representing an image or chart for display. For backwards compatibility, if no mediaInfos provided, the popupElement will display whatever is specified in the PopupInfo.mediaInfos property. |
text | This property applies to elements of type text . This is a string value indicating the text to be displayed within the popupElement. If no text property is provided, the popupElement will display whatever is specified in the PopupInfo.description property. |
title | An optional string value indicating what the element represents. This property does not apply when the type is text or expression . |
type | String value indicating which elements to use. When an element is of type expression then expressionInfo is the only valid property.Valid values:
|
Additional information
Each popupElement has a type
property. This string value indicates the type of popupElement used.
popupElement Example
{
"popupElements": [
{
"type": "text",
"text": "Some descriptive text describing the popup."
},
{
"type": "fields",
"fieldInfos": []
},
{
"type": "media",
"mediaInfos": []
},
{
"type": "attachments",
"displayType": "list"
},
{
"type": "expression",
"expressionInfo": {}
}
]
}