Taylor’s Corner: Exploring Parameters (Global Parameters)

bigger logo

Working with the more advanced features of Cloverleaf, like parameters, can be overwhelming, but fear not. Using the tips listed in this post will give you great knowledge of how to create and use them.

Parameters are a feature of Cloverleaf that allow users to build lists of items to be used for formulations, filters, or other data logic. These can be used in the Discovery module, different lists, calculations in Formulate, and in Presentations. Visually, parameters use the same representation as slicers but impacts the query differently. While slicers filter the content of the underlying query, parameters inject data elements into the select data.

To open a new parameter, simply click the formulate module and select parameter.

The first step will be to define if the parameter is model or global based. Model-based parameters are defined for a single model, while global-based can be used across different models. For this example, we will select global.

In the next tab we will define the parameter type. Are the members of the list text-based or numeric? For this example, we will select number.

Then we will select how members are added to the list.

A discrete list parameter allows for a list of hard-coded values for users to pick from a definitive list of items. Continuous parameters allows for the user to pick something from a list of items based on a numerical range that has only been described by that range. While ‘Free Input’ lets users enter input into the application using any acceptable value instead of choosing from a predefined list.

For this example, we will create a parameter that allows for the user to show the top or bottom of any number of items in a list. So I will select ‘free input’ and ‘any numeric value’ for the input validation. The input validation, shown only with free inputs, makes sure that a character the user enters meets the criteria of the parameter.

In the Default tab, select the type of visualization which determines how the parameter will appear in visuals. The ‘Parameter Value’ determines the default value for the parameter. We will use 10 in this example.

Similar to how you would save a formula or discovery, save the parameter to the desired folder. This will determine who has access to the parameter. Once saved, the ‘@’ icon is used to show that it is a parameter.

Since we have saved this global parameter, it can now be applied to a discovery. In this example discovery, we have States displayed by their different premiums.

To activate the filter, click ‘Sort & Filter’ in the report tab, then select filter.

Next, click the ‘+’ to add a filter and select the hierarchy to be filtered. The filter type displays various options: top or bottom count, sum, top or bottom percent, etc.

The Parameterize option allows the user to select a parameter to be used as an input into the filter. We will select the Parameterize option and add in the parameter we just created. Select ‘Apply.’

The parameter injects the input value into the filter for the defined hierarchy.

User’s are able to adjust the input and the report data shown will adjust.

Check out our Platform section for more details on our services.