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

837
1
03-24-2022 01:36 PM
KatyFlaherty
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
jcarlson
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.

 

jcarlson_1-1648157299796.png

 

 

jcarlson_0-1648156970905.png

 

- Josh Carlson
Kendall County GIS
0 Kudos