In this article
Metrics can be broken down using selectors in a datagrid. Lists within selectors can be defined once using valueSet in the config hub section for reuse.
Example of using several selectors View CDL widget dataGrid #dataGridWidget { label: "Metrics by breakdowns" size: medium select #selectorEx2 { label: "Pick a metric" options: item { label: 'Overall Satisfaction' value: :OSAT }, item { label: 'Claims Ease' value: :ClaimEase }, item { label: 'Likelihood to Renew' value: :Renew } } select #tablebreak { label: 'Break by' options: @commonBreaks.items } column #copy_of_column { cell microchart#cell { value: average(numeric(@selectorEx2.selected)) microchart bar #barMicrochart { valuePosition: outer max: 10 } target: 7 } label: "Average" } column #copy_of_copy_of_column { cell microchart #cell { value: average(numeric(@selectorEx2.selected)) microchart line #barMicrochart { min: auto max: auto } target: 8 breakdownBy date #dateBreakdownby { value: :interview_start breakdownBy: "calendarQuarter" } } label: "Trend" } row cut #row { value: @tablebreak.selected total: "none" } filter expression #expressionFilter { value: selected(:team, "3", "5") label: "Team" } } | Reusing Lists for SelectorsFor commonly used lists within a selector, you can define this once in the config hub section using a valueSet: View CDL valueSet#commonBreaks { item { label: 'Claims Center' value: :claimsCenter } item { label: 'Team' value: :team } } And then you simply refer to this valueSet in any selector that you wish to reuse this list in the options property: View CDL label: 'Break by' options: @commonBreaks.items }
|
Note
Selector values are remembered when you navigate between pages