Conditional expressions

Accounting CS lets you insert conditional expressions for selected elements in the design grid of the Layout Designer to specify content to print only when the criteria for the condition are met.

Insert a new conditional expression

  1. In the design grid of the Layout Designer, select an element, then select
    Insert
    and
    Conditional Expression
    .
  2. Use the Condition grid to build a conditional expression.
The following table lists the operators available for the conditional expressions.
Operator
Description
=
Equal to
<>
Not equal to
<
Less than
<=
Less than or equal to
>
Greater than
>=
Greater than or equal to
Has data
The selected item includes data
Has no data
The selected item doesn’t include any data
Contains
The selected item contains specified text
Does not contain
The selected item doesn’t contain specified text
note
  • The operator field in each row of the Condition grid is preceded and followed by text fields. Select the
    Formula
    button to insert a formula, variable, amount, or text as part of the conditional expression. To enter static text for a condition to test, be sure to enclose that text within quotation marks.
  • Existing conditional expressions are tagged with a green triangle on the element.
  • You can build complex conditions by selecting
    AND
    or
    OR
    at the end of a row in the grid, which opens another row to add to the condition. Note that you can keep building to the current condition beyond the 6 visible rows in the Condition grid. When you have filled the 6 rows, and then select
    AND
    or
    OR
    at the end of the 6th row, a scrolling region is displayed so that you can add more items to the condition.
  • Multiple tabs are displayed in the
    Conditional Expression
    window only if more than 1 condition is set up for the current expression.
  • A new tab is automatically added in the
    Conditional Expression
    window (for example, Condition 1, Condition 2, and so forth) when you select the
    Test next condition
    option.

Action conditions

If true, print
  • Print element
    (marked by default): If the conditional expression meets the criteria specified, the selected element is included in the output for the layout.
  • Print
    : If the conditional expression meets the criteria specified, the value in the field (including a formula and/or variable) is included in the output for the layout.
If false . . .
  • Complete condition
    (marked by default): When you mark this option and the conditional expression doesn't meet the criteria specified, the selected element is not included in the output for the layout.
  • Test next condition
    : If you mark this option, a new
    Condition
    tab is automatically inserted in the
    Conditional Expression
    window to let subsequent conditions be evaluated if the previous condition was not met.
  • Print element
    : If the conditional expression doesn't meet the criteria specified, the selected element is included in the output for the layout.
  • Print
    : If the conditional expression doesn't meet the criteria specified, the value in the field (including a formula an/or variable) is included in the output for the layout.

Edit an existing conditional expression

Select an element in the design grid of the Layout Designer where a conditional expression already exists, then select
Format
,
Conditional Expression
.

Remove an existing conditional expression

Select an element in the design grid of the Layout Designer where a conditional expression already exists, then select
Insert
,
Remove Conditional Expression
.
Conditional expression that prints only if the Net Check amount is greater than zero
If you are designing a check from scratch, you may not want to include several elements in the check when the account is set up for direct deposit. There is a common conditional expression that can be applied to variables, such as Bank Name (Payroll.Check.BankName), Routing number (Payroll.Check.BankRoutingNumber), Signature (Payroll.Check.Images.Signature), and MICR Line (Payroll.Check.MICRLINE) that enable you to print those elements only if the amount for that item is
greater than zero
. That way, those elements don't show up on zero-amount checks that are direct deposited to the bank. In the following example, we’ll apply the zero-amount conditional expression to the Net Check Amount variable.
  1. Open a check layout in the Layout Designer.
  2. Select the
    Payroll.Check.NetPay.NetCheckAmount
    variable in the check layout.
  3. Select
    Insert
    , then
    Conditional Expression
    to open the
    Conditional Expression
    window.
  4. Select the
    Formula
    button in the 1st field of the 1st row to open the
    Formula
    window.
  5. Select
    Payroll
    Check
    NetPay
    Net Check Amount
    , then select
    OK
    to close the
    Formula
    window.
  6. In the
    Conditional Expression
    window, select the
    greater than
    (
    >
    ) sign from the dropdown list in the 2nd column of the 1st row.
  7. Enter
    0
    in the 3rd field of the 1st row, then select
    OK
    .
note
  • You can only use double quotes ("), not single quotes (') when you enter text as part of the conditional expression.
  • You can apply conditional expressions on layout elements, such as a text box, drawing/shape, variable, or a whole repeating region (yellow section).

error-icon

Triva isn't available right now.

Check out the support page for our phone number and hours

error-close