Use user_attributes as Canvas Dashboard Filter Defaults
Summary
Enable dashboard filters to accept user_attributes as their default values. This would allow dashboards to open with personalized, user-aware defaults (e.g., “my team”), eliminating the need for duplicated dashboards or manual resets each time.
Example
@template(
title = "My Coordinator Pair Filter",
description = "Reusable coordinator filter block",
)
Func coordinator_team_filter() {
FilterBlock {
label: "Coordinator Pair"
type: "field"
source: FieldFilterSource {
dataset: stack_examiner_timing
field: ref("team_data", "coordinator")
}
default { operator: "is", value: H.current_user.coordinator_team }
}
}
Benefits
- Makes dashboards automagical: users see the data they care about right out of the gate.
- Enhances scalability: one dashboard can serve many roles or teams without duplication.
- Reduces maintenance overhead: eliminates the need to manage multiple dashboards or hardcoded defaults.