Apply view state
rillsoft_view_state_applyApplies a view state to switch the visible view and set its grouping, filters, and timescale, exactly restoring a previously saved configuration.
Instructions
Switches the visible view ('view.name', for example gantt or employee) and sets its state - grouping, presentation, secondary view, time and task filter, time scale, application-wide switches - in the shape of the rillsoft_view_state_get answer: reading it and applying it back restores the state exactly. Informational fields (baseline, note, favorite) are ignored; rillsoft_baseline_select is what switches the baseline, and rillsoft_view_favorite_select is what switches to a favourite view. At least one section is required. One undo step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | informational field of the answer, ignored here | |
| view | No | the view part in the shape of the rillsoft_view_state_get answer: name, grouping, display, secondaryView, secondaryChart, costCurve and the view options; everything but the cost curve together forms exactly one undo step | |
| baseline | No | informational field of the answer, ignored here; rillsoft_baseline_select is what switches the baseline | |
| timescale | No | { level } as in the answer; a step of its own, with the command semantics of rillsoft_timescale_apply | |
| taskFilter | No | the task filter in the shape of the answer; active:false clears it, the id lists are absolute - what is not named is deselected. Set on the view named under 'view' and part of that same undo step; a call that carries nothing but taskFilter is no undo step at all, just like the filter dialog | |
| timeFilter | No | { active, from, to }; active:false turns the filter off. Part of that same undo step | |
| application | No | application-wide visibilities including tooltips; persistent and outside undo, just like the ribbon switches |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | hint on the reach of the values under 'application' | |
| view | Yes | the visible view and its view-bound options | |
| baseline | Yes | selected baseline | |
| timescale | Yes | time scale of the time axis | |
| taskFilter | Yes | task filter of the view: resources, calendars and the three switches | |
| timeFilter | Yes | time filter of the presentation | |
| application | Yes | application-wide and persistent presentation switches |