Since version: 1.32
The Experience Builder List Item Widget Formatting profile is used in ArcGIS Experience Builder to customize individual list items within a list widget, as well as widgets placed inside a list item. This profile allows you to write expressions that generate dynamic content and styles based on the data of each list item. For dynamic content, the expression is expected to return a value. For dynamic style, it should return a dictionary of supported style properties and their corresponding values.
Context
The following products implement this profile:
Spatial reference
This profile does not include geometry functions and therefore does not need to define a spatial reference for the execution context.
Time zone
The Experience Builder time zone determines the execution context's default time zone.
Profile variables
| Variable Name | Type | Description |
|---|---|---|
$feature | Feature | Represents the feature in the list item. |
Function bundles
Return types
Number | Text | Date | DateOnly | Time | Dictionary
If the return value is text, number, or date, the value will be used as dynamic content to display in the widget. If the return value is a dictionary, the dictionary can contain value and styles. Style can change the rendering style of the widget.
For a list of valid dictionary keywords, click here.
Example
var green = Constrain(Round(($feature.POP2000 / 10000) * 255), 0, 255);
var color = `rgb(0, ${green}, 0)`;
return {
background: {
color
}
};