Use Dashboard category selector in arcade expression to filter table $datapoint columns

03-24-2022 01:36 PM
New Contributor

I have a dashboard that contains a table based on a Layer, Table type: Features. I use a Header: Category Selector: Grouped values based on the fields in the table that filters the table. 

I am looking for a way to return various columns from said table based on the selection from the category selector using arcade expressions. (or alternatively return various tables with the columns pre-determined selected by the selector)

I have looked through the arcade documentation and have not found a callable function for calling the category selector.

iif (Category Selector(1)=A:

return{cells:{col1:{...},col2:{...}, col3:{...}}}

else iif (Category Selector(1)=B:

return{cells:{col1:{...},col2:{...}, col3:{...}, col4:{...}}}

else iif (Category Selector(1)=C:

return{cells:{col2:{...}, col3:{...}, col4:{...}}}

0 Kudos
1 Reply
MVP Esteemed Contributor

Category selectors work on a per-feature basis, and only on the values of a single field. You're trying to alter the appearance of the table based on the category?

The table's value fields (columns) are configured in the widget itself, and aren't tied to the data source. You can tell your script to return different columns based on some other value, but that only controls whether the values appear in the table, and does not impact the table layout itself.

Unfortunately, I don't believe what you're attempting to do is currently possible.







- Josh Carlson
Kendall County GIS
0 Kudos