Column and Expand Set Parameter Code Samples
Here is an example of a column-set that uses a parameter to control both the data and its heading.
This is the the result of the code in DiveTab.
The take-parameter tag identifies summary as the placeholder value, so every "$(summary)" used in the column-set is marked as a variable.
The pass-parameter tag identifies which placeholder value it replaces and the replacing value. The first argument for pass-parameter identifies the take-parameter variable; the second argument is the value for that variable. For this example, pass-parameter replaces the take-parameter summary variable with the Cases summary.
The same column-set can be used multiple times with different pass-parameters. For example, a second column-set could use Cost for the pass-parameter.
Here is a more customized example with column-sets and expand-sets, and two parameter values in use.
This is the result of the code in DiveTab, showing the Quarters expand for Cost.
The expand for Past Years is not shown.
See also:
- What is a Parameter?
- What is a Column Set?
- What is an Expand Set?
- Adding an Expand Set with a Parameter