Adding Computed Fields (COMPUTE) in a Synonym

How to:

You may create a Computed field as a custom field in the Synonym Editor. The procedure for adding a custom field is similar to the procedure used to add a Defined field. The Computed field is identified as the Master File Computed field and is differentiated from the Defined fields and the other Computed fields.

Note: Computed fields from the Master File appear in the Report Painter fields list.

Top of page

Procedure: How to Create a Computed Field in the Synonym Editor

To create a computed column in a synonym

  1. From the Projects or Data Servers area, open a synonym by double-clicking a Master File from the Master Files folder.

    The Synonym Editor opens.

  2. Right-click a segment (or column), select Insert, and click Compute.

    The Compute Calculator opens.

    Compute Calculator

  3. From the Compute Calculator, type a name for the column in the Column input field or use the default compute name.
  4. You may enter a descriptive title for the computed field (COMPUTE) in the Title input field.

    Tip: From the Synonym Editor, click the browse (...) button at the right of the TITLE and DESCRIPTION value fields to specify multiple language titles.

  5. Use the Expression tab and the calculator buttons to build the expression for the computed field (COMPUTE).


    Use the Relational Expression tab to build the expression.

    1. From the Relational Expression tab, click the Add New Row button and use the drop-down lists to select the filter Column, Relation, and Type.

      Note: Parameters are not supported.

    2. Click the browse (...) button at the right of the Value input field.
    3. Select from the available values and use the arrows to add or remove values.
    4. Click OK to close the Value Selection dialog box and return to the Relational Expression tab.

      The expression is added to the value field.

    5. To add another filter, double-click a column or variable from the Columns/Variables tab on the right side of the Compute Calculator.

      The filter is added to the Relational Expression tab, where you can add the expression value.

    6. To delete an expression, select the number or field column of the expression and click the Delete button, or right-click it and select Delete selected row(s). The expression is removed from the Relational Expression tab.
  6. You may click the Check expression and Sample Data buttons, located on the top right of the Compute Calculator, to verify that the expression is valid and to view sample data for the filter.
  7. Click OK to close the Compute Calculator and return to the Synonym Editor.

    Note: To edit the Compute, Title, or Expression, you may do so directly from the Properties section of the Synonym Editor or you may click the browse (...) button at the right of the EXPRESSION value field to relaunch the Compute Calculator.

  8. Specify the Missing Data options for columns that allow null data. You can allow all missing data.
  9. Click Save from the File menu to save the synonym.
  10. To close the Synonym Editor, select Close from the File menu or click the control button in the upper-right corner.

For more information about expressions and COMPUTE attributes, see Defining Attributes and Creating Expressions for Custom Fields.