ArcGIS Enterprise 11
Dashboards.
I have a very large table, that only needs to be viewed by a certain value at any given moment. For example, if I have a million rows with points, I only need to show the 250 rows that belong to the date 5/10/22.
I have it working in that way currently with a metadata table, and the category selectors, but the dashboard is super slow because it loads EVERY point, and then filters. I can see it loading the points in the chrome developer tools network logs. Is there any way to make the map only load what its being filtered by?
I've seen query layers with parameters, but these need to be predefined from my knowledge. I don't want to have to define more when the metadata table changes.
Thanks for any suggestions!
You could use a Data Expression and hard-code a filter into it. This would effectively put a where clause on your queries right out of the gate, thereby limiting the incoming data.
var fs = FeatureSetByPortalItem(
Portal('your portal url'),
'service itemid',
0, // or whatever the layer index is
['fields', 'you', 'need'],
false // or true, if you actually need the geometry
)
return Filter(
fs,
`${some_date_field} >= DATE '2023-05-10 00:00:00' + INTERVAL '01' DAY`
)
You can make this query sort of dynamic, too, by supplying a calculated value for the date, or using "CURRENT_TIMESTAMP".
Oh, but data expression layers can't show up on the map, so this might be a dealbreaker.
If you need the filter to change based on user input, then this probably isn't possible.
Another thought: if the category selector is set to "show only when filtered" on the map layer, does it behave any differently?