Select to view content in your preferred language

How to filter data in a data expression

41
0
yesterday
ChuckS
by
Occasional Contributor

I'm new to using Data Expressions in Dashboards. I'm not sure if what I'm trying to do is simple or complex. My data expression is from a similar dashboard from a colleague.

I'm creating a Table dashboard element that uses a data expression. Currently, I only have 5 records in my feature layer. Elsewhere in the dashboard, I have 3 Category Selectors which have Actions that filter data displayed in my Table element. The default selection for the Category Selectors would only display 3 records in the Table.

When I use FeatureSetByPortalItem in the data expression for the Table (shown below), it gets ALL records from the feature layer. How do I access only the records which are filtered by the Category Selectors? I'm iterating through the records to get the most recent record for a specific value in a field, but the result is a record which is not displayed (based on the Category Selectors).

var originalLayer = FeatureSetByPortalItem(
  Portal('https://arcgis.com/'), 
  myFeatureLayerID,
  0
);

 

0 Kudos
0 Replies