About expressions

An expression is a formula used to compute the value of a calculated field. An expression can contain fields, constants, operators, and functions.

The examples below help illustrate the syntax of expressions:

  • To calculate the year-to-date activity for a ledger account, the following expression subtracts the beginning balance from the ending balance:

    LGRACT.ENDBAL-LGRACT.BEGBAL
  • You can create a single field that inserts the employee’s last name, followed by an ampersand, and the first name. When you generate the report, Sage 100 Contractor adjusts the placement of the first name relative to the length of the last name:

    EMPLOY.LSTNME&EMPLOY.FSTNME
  • The following expression inserts the ledger account number and the ledger account long name. When you generate the report, Sage 100 Contractor adjusts the placement of the long name relative to the length of the ledger account number:

    LGRACT.RECNUM LGRACT.LNGNME