Omniscope Custom Views › switchparam

Switch Param

Radio buttons that set a project parameter, chosen from a field's values.

Tool

Open the demo in Omniscope Download demo.ioz Sample data: orders.csv Source on GitHub

Radio buttons that set a project parameter, chosen from a field's values.

Live: pick a region. The view sets the project parameter Region; here the Workflow REST API is simulated.

The problem it solves

A parameter that selects a region, a year or a scenario is easiest to set from a list of the values it can take. Typing it in the workflow's parameter settings is slow, and only authors can do it.

The Switch Param view lists the distinct values of a field and ticks the parameter's current value. A click sets the parameter for every block that uses it. Above, an illustrative Region parameter.

Where it earns its place

The examples below are illustrative.

Team Parameter
Sales The region a scheduled export covers
Finance The budget scenario: base, upside, downside
Data team The source system a task loads next

How to use it in Omniscope

  1. Create the project parameter and use it in blocks.
  2. Give the users who should change it the Project parameters access via APIs permission.
  3. Connect a source listing every value (for example the unfiltered data) to the report.
  4. Add a view, choose Switch Param, set Parameter name and Values from.
  5. To run the workflow after a change, add a Workflow Execution button, or use Switch Param and Execute Workflow instead.

Why do this in Omniscope

Data and options

A field with the values to offer.

Option What it does
Parameter name The project parameter to set
Values from The field whose values are offered
Most values shown Limit on the list (default 100)

Tested

Mock harness with a stand-in for the Workflow REST API: the current value ticked on opening; a click sends one update with the chosen value and confirms it; a number parameter is set to a number, and opening the view never sends an update; clicking the current value sends nothing; a refused update keeps the previous value; an unknown parameter is reported; filtering narrows the choices and says when the current value is not among them; a 120 by 70 pane; empty data; no settings; and 3,000 values (the first 100 shown, and the limit changed to 25).

Reference

Fields it reads

NameTypeWhat it does
Values fromGROUPINGField whose distinct values become the choices. Use a data source with every value, so the choices do not depend on the parameter itself.

Options

NameTypeWhat it does
Parameter nameTEXTName of the project parameter to set, exactly as in the workflow's parameters.
Most values shownNUMBERShow at most this many values (default 100).