The sample demonstrates how to add fields containing custom content to the FeatureTable widget. The table contains FieldColumns, as well as standard Columns. In addition, it also has a custom ActionColumn.
The ability to generate virtual columns with custom content was introduced at version 4.30. This example contains multiple columns displaying different types of content with varying behavior. Each column and its behavior is outlined in the table below.
Field label | Column type | Description |
---|---|---|
ID | FieldColumn | No custom content |
School Name | FieldColumn | No custom content |
Enrollment Capacity | Column | Creates custom content using formatFunction which returns a percentage of enrollment capacity and displays this using a Calcite Meter component |
Calculate Expression | Column | Creates custom content using formatFunction which returns a Calcite Action component which provides the ability to run a calculation individually. This can be useful in situations where there is an Arcade expression, but running this expression on every row may not be necessary. Once the button is clicked, it is replaced with the calculated arcade expression. |
Website | FieldColumn | Creates custom content using formatFunction which returns a Calcite Link component that opens up a new window with a link to the associated school's website. |
Enrollment | FieldColumn | No custom content |
Total Employees | FieldColumn | No custom content |
Ration of Students to Employees | Column | Creates custom content using formatFunction which returns calculation of students to employees. |
Go to feature | ActionColumn | Creates a custom action that is based off specific behavior set within its callback. In this example, it zooms to the extent of the clicked feature. |
Known Limitations
For a comprehensive list of limitations, please refer to the widget's API Reference documentation.