Page tree
Skip to end of metadata
Go to start of metadata

PQL statements can be saved as variables and re-used in different parts of your analysis.

How to use variables

Variables can be used in all text input fields and formula inputs in the analysis UI.

Syntax
<%=VARIABLENAME%>

 

Input components allow you to change value in the text input or formula input within the variable. You can change the variable's content with:

  1. Buttons

  2. Button dropdowns

  3. Input fields

 

 

Manage Variables

  1. Variables can be managed in the analysis setting in the tab: Variables

  2. Create new variables with the button 'Create variable'

  3. Search your existing variables with the search input.

  4. All existing variables are listed in the table below 'My variables' and sorted by name.

  5. Each variable shows which type of variable it is, a static value or text replacement.

  6. On the last column each variable previews its current value. In case of the static value it shows a preview of the calculated value on text replacement it will show the currently stored text.

 

 

Create a text replacement variable

The text replacement variable will put the text that it stores wherever you are using the variable in the analysis. You can share reoccuring text snippets all over the analysis.
  1. The defined variable name will be used to call the variable in the rest of the analysis. Spaces and special characters are automatically replaced by '_'.

  2. There are two types of variables. You can switch between the types with the available dropdown.

  3. On the textinput field you can set the variable's value. Be aware, that this value can be overwritten by other components like a button. This input will always show the current value that is set on the analysis draft.


  4. Remove the variable with the remove button. (Only available if the variable was saved once)

  5. Duplicate the currently opened variable. The duplicate will be added to the list of your variables and '_1' is added to the name.

  6. Cancelling will cancel all your changes and you exit the edit view for the variable.

  7. Saving will apply your changes to the variable you were just editing.

Nested variables are not supported.

 

Create a static value variable

Static value variables calculate the PQL statement you define and store the value. This static value can be reused all over the analysis. The calculation will respect the analysis loadscript but ignore component and sheet loadscripts and ad-hoc selections.

  1. The defined variable name will be used to call the variable in the rest of the analysis. Spaces and special characters are automatically repalced by '_'.

  2. There are two types of variables. You can switch between the types with the available dropdown.

  3. The PQL statement defined on the function input will be evaluated to the start of each session.

  4. Refresh the preview if you change the PQL statement.

  5. You can also use the full function editor to create the PQL statement.

  6. Remove the variable with the remove button. (Only available if the variable was saved once)

  7. Duplicate the currently opened variable. The duplicate will be added to the list of your variables and '_1' is added to the name.

  8. Cancelling will cancel all your changes and you exit the edit view for the variable.

  9. Saving will apply your changes to the variable you were just editing.