Defining Expressions


Concept


Steps:

  1. Begin by navigating to the Expressions page.

     

    Click the Reporting Tools link.

    Step 1
  2. Click the Query Manager link.

    Step 2
  3. In this example, you will search for the MESSAGES_FOR_MSGSET query.

     

    Enter the desired information into the begins with field. Enter

     a valid value
     e.g.
     "MESSAGE"
    .

    Step 3
  4. Click the Search button.

    Step 4
  5. Click an entry in the Edit column.

    Step 5
  6. Click the Expressions tab.

    Step 6
  7. Use the Expressions page to add or edit expressions for queries.

    Step 7
  8. Use the Add Expression button to open the Edit Expression Properties page.

     

    Click the Add Expression button.

    Step 8
  9. Use the Edit Expression Properties page to define or edit expressions for queries.

    Step 9
  10. If you select the Character option for Expression Type field, enter the maximum length of the expression result in the Length field.

     

    If you select the Number option or the Signed Number option, enter the total number of digits in the Length field and the number of digits after the decimal point in the Decimal field.

    Step 10
  11. In this example, you want to set the Length field to 20.

     

    Enter the desired information into the Length field. Enter

     a valid value
     e.g.
     "20"
    .

    Step 11
  12. If you are entering an aggregate value, such as SUM, AVG, or COUNT, select the Aggregate Expression check box.

    Step 12
  13. In the Expression Text field, enter the expression.

     

    For example, A. Total * .1, where A represents the first record.

     

    Query Manager inserts the expression into the SQL for you.

    Step 13
  14. Use the Add Prompt button to add prompt properties for this expression.

     

    Note that you must define a prompt before you can add it to your expression.

    Step 14
  15. Use the Add Field button to add another field to this expression.

     

    Click the Add Field link.

    Step 15
  16. In this example, you select the Message Number field.

     

    Click the Message Number link.

    Step 16
  17. In this example, you will set the Expression Text field to be A.MESSAGE_NBR+2.

     

    Enter the desired information into the Expression Text field. Enter

     a valid value
     e.g.
     "+2"
    .

    Step 17
  18. Click the OK button.

    Step 18
  19. Click an entry in the Use as Field column.

    Step 19
  20. Click the Save button.

    Step 20
  21. Click the Run tab.

    Step 21
  22. In this example, you will set the Message Set Number field to 5.

     

    Enter the desired information into the Message Set Number field. Enter

     a valid value
     e.g.
     "5"
    .

    Step 22
  23. Click the OK button.

    Step 23
  24. Use the Run page to view the results of your query prior to saving in order to verify that your query yields the results that you need.

    Step 24
  25. The MESSAGE_NBR+2 column has the value of the Msg column plus 2.

    Step 25

You have successfully defined an expression.

Table of Contents  Start Topic