Spectre Expressions Editor

The Spectre Expressions Editor is a dialog box that provides assistance for creating and editing expressions in Spectre files anywhere that an expression is allowed.

In the Edit Expression dialog box, you can:

  • Get help with the syntax for a function by starting to enter the name—a pop-up window lists potential functions.
  • Display documentation in the Documentation pane by placing the cursor within a tag in the Expression pane. This feature facilitates accessing the documentation for nested functions.
  • View the Available Columns in this data set. Double-click a column to include it in your expression. (The available columns display only in the Spectre Build Script editor.)
  • Write or edit an expression. You can use keyboard shortcuts or right-click to access Copy, Paste, and Delete from the context menu.
    NOTE: As you work in the Expression field, you can use Ctrl+Space to display a list of available tags. For more information about getting help while editing, see Syntax-Aware Text Editor.
  • See any syntax errors or any other errors regarding functions.
  • Adjust the size and spacing of the panes. Workbench saves the size and the location settings for future sessions.

Access from the Text Editor

To open the Expressions Editor in a Text Editor tab when working with a script such as a cPlan or Spectre Build:

  1. Enter a line with a tag that uses an expression.

  2. Click anywhere between the open and close backticks that contain the expression.

    A small red box appears at the end of the expression. The pointer turns into a hand icon when you move the cursor over the red box.

    Click box at end of expression

  3. Click the small red box under the close backtick mark.

    The ClosedEdit Expression window opens, and you can fine-tune the expression.

    TIP: Alternatively, you can use the F2 keyboard shortcut key to open the Spectre Expressions Editor window when the cursor is within the open and close backtick marks.

Access from the Spectre Build Flow Editor

To open the Expressions Editor in the Spectre Build Flow Editor:

  1. Open the Calc object.
  2. Select an Operations row or create a new one by clicking either the Add Operation icon or Replace Operation icon .

    The Expression panel opens for that operation, and you can enter and fine-tune the expression.

    For example:

Access from the Measure Factory Editor

When editing measures and calc or link rules using the Measure Factor Editor, you open the Expression Editor.

To open the Expression Editor from the Measures tab:

  1. Double-click an existing Measure Name in the left pane, or click New in the heading.

    The measure Closeddetail pane opens on the right.

    Factory Config Measure Detail

  2. In the Data section, click the Pencil icon Pencil Icon for the Calc or Filter to open the Spectre ClosedEdit Expression dialog.

    Spectre Edit Expression from Factory Config

  3. Make your edits and click OK to save them, or Cancel to discard them.

To open the Expression Editor from the Rules tab:

  1. Double-click an existing calc or link Rule Name or click New in the heading and create a calc or link rule.

    The rule Closeddetail pane opens on the right.

    Factory Config Rule Detail

  2. In the Data section, click the Pencil icon Pencil Icon to open the Spectre ClosedEdit Expression dialog.

    Spectre Edit Expression dialog for a rule

  3. Make your edits, and then click OK to save them or Cancel to discard them.

See also: