The formula bar offers an intelligent way to build formulas for Klips (in the Klip Editor or when modelling a data source you'll use to build a Klip) and in PowerMetrics (when modelling a data source or editing a data feed you'll use to build a custom metric).
You can type a formula directly in the formula bar or select from a list of functions. When you start typing a function name in the formula bar, a list of functions filtered by the letter you entered is displayed. Online help with examples and parameters automatically pops up for each function.
This article includes:
- Formula bar shortcuts and tips
- List of operators
- Selecting content in the formula bar
- Accessing in-app Help
- Troubleshooting errors in the formula bar
- Tips on using the formula bar in the Klip Editor (video demo)
Formula bar shortcuts and tips
The following table includes formula bar shortcuts and tips:
In the formula bar, type: |
Result |
Text |
Start typing to display a list of available functions, variables, and references. The function is automatically added to the formula bar when you select it. Use the arrow keys to navigate to a function in the list. Press Enter to select it when you find the function you want. Note: Click the Browse All Functions link at the bottom of the function list to see the Function Browser in the right sidebar. |
@ |
Type @ to manually enter a column reference from the active data source. |
$ |
Type $ to display a list of available variables. Note: Variables are supported in the Klip Editor only. They are not supported when modelling a data source or editing a data feed. |
& |
Type & to reference results of actions and formulas applied to other sub-components/columns. |
! |
Type ! to reference formulas from other sub-components. Note: Formula references are supported in the Klip Editor only. They are not supported when modelling a data source or editing a data feed. |
|
Use " around a value to convert it to a string. |
ALT + A or the Lightning Bolt button | Evaluates the formula. |
CTRL + A or Command+A | Selects everything in the formula bar. |
CTRL + E | Selects the function that your cursor is on. |
Ctrl+Home or Command + Left arrow | Places the cursor at the beginning of the formula. |
// | Type // to add single line comments to explain portions of your formula. |
/*
multiple */
|
Type /* to add multiple line comments to explain portions of your formula. |
Enter |
Applies the selected function. |
CTRL+Enter or SHIFT+Enter |
Adds a line break in the formula bar to make it easier to work with long formulas. |
CTRL+Space |
Displays the function list. |
CTRL+Shift+F or use the three- dot menu |
Formats the formula. |
ALT+L or use the three-dot menu |
Displays line numbers. |
CTRL+Z |
Undoes an action when modelling a data source. Learn more about actions you can perform when modelling a data source and when editing a data feed. |
List of operators
The following table includes a list of available operators:
Selecting content in the formula bar
The following table describes how to select content in the formula bar:
In the formula bar: |
Result |
Click anywhere in the formula |
Sets the focus and places the cursor. |
Click on a parenthesis (brackets) in your formula |
Places the cursor next to the clicked parenthesis. The matching parenthesis is also selected. |
Double-click on a string |
Selects the string. |
Triple-click |
Accessing in-app Help
When you select a function, a help pop-up displays a description, examples, and parameter information. You can dismiss the Help pop-up by clicking the X in the dialog and reactivate it at any time with the Show Function Help button.
Troubleshooting errors in the formula bar
Errors are highlighted in the formula bar:
- A function or parameter that has the wrong syntax appears highlighted in red in the formula bar.
- A tool tip is displayed when you hover over a syntax error in the formula bar.
- If the formula evaluation results in an error, a red border will appear around the entire formula bar and an error icon will display.
Tips for using the formula bar in the Klip Editor (video)
The following video demo focuses on techniques for using the formula bar in the Klip Editor: