Examples of inline conditional expressions for letters

You can use inline conditional expressions to customize predefined letters or to create your own letters in Report Designer. Using inline conditional expressions in letters enables you to include or exclude information as defined by criteria of the conditional expressions and provides a time-saving advantage by allowing you to apply them globally across multiple clients in the firm.
Inline conditional expressions consist of formulas that contain standard operators (=, <>, <=, <, >, >=) separated by arguments such as & (and), | (or) that are entered directly into a letter within the design grid. Output statements entered after the question mark (?) need to be in parentheses. Plain text variables need to be contained in their own sets of parentheses, joined together by a plus sign (+) between them. Within each set of parentheses, plain text needs to be in quotes, but variables do not.
To open a letter for editing, select File, then Report Designer. Select the plus sign next to the Letters folder to expand the list, and then double-click a letter to open it in the design grid.
note
We recommend that you save a predefined letter as a new copy by selecting File, then Save As before making changes.

Example of an inline conditional expression

Remittance: [FilingInstructions.AmountDue > 0 ? ("Payment of ") + (FilingInstructions.AmountDue) + ("is required.")][FilingInstructions.AmountDue = 0 ? ("None is required.")][FilingInstructions.AmountDue < 0 ? ("None is required. There is an overpayment of $ ") + (FilingInstructions.AmountDue * -1) + (".")][FilingInstructions.PenaltyInterestDue > 0 ?(" Penalty and interest of ") + (FilingInstructions.PenaltyInterestDue) + (" is included.")]
Operator examples
Operator
Description
Has Data
[HasData(Client.DBAName) ? ("DBA Name has data")]
Has No Data
[HasNoData(Client.DBAName) ? ("DBA Name is blank")]
Contains
[Contains(Client.Name,"test") ? ("Client name contains test.")]
Does Not Contain
[DoesNotContain(Client.Name,"abc") ? ("Client name doesn't contain abc.")]
Equals ("="), with the or ("|") argument
[Client.CustomFields.Checkbox.Value = "Yes" | Client.CustomFields.Text.Value = "Testing" ? ("The checkbox is yes or the text is testing.")]
Equals ("="), with the and ("&") argument
[Client.CustomFields.Checkbox.Value = "Yes" & Client.CustomFields.Text.Value = "Testing" ? ("The checkbox is yes and the text is testing.")]
Greater than or equal to (">=") a number and less than ("<") another number
[Client.CustomFields.Number.Value >= 1 & Client.CustomFields.Number.Value < 100 ? ("The number is greater than or equal to 1 and less than 100.")]

Changing the salutation in a compilation letter based on the client's entity type

This inline conditional expression changes the salutation based on the client's entity type. (The default greeting used in the application is
To the Board of Directors
.)
[Client.EntityType.Entity = "1120S" ? ("
To the shareholders
")][Client.EntityType.Entity = "1065" ? ("
To the partners
")][Client.EntityType.Entity = "1120" | Client.EntityType.Entity = "990" | Client.EntityType.Entity = "990PF" ? ("
To the board of directors
")]
1 of the following salutations is displayed in the Compilation Letter:
  • S Corporation (1120S):
    To the shareholders
  • Partnership (1065):
    To the partners
  • C Corporation - Non-Profit (990) or Non-Profit private foundation (990PF):
    To the board of directors

Displaying a different value in a compilation letter based on the client's custom field variable

The following inline conditional expression is based on the value of a client custom field variable.
  1. Select Setup, Custom Fields, and then Clients. Add a new field with the following settings:
    1. Description
      : Basis
    2. Type
      : List
    3. Sort
      : 0
    4. List items
      :
      1. ID
        : TACCRUAL,
        Description
        : Tax, Accrual
      2. ID
        : TCASH,
        Description
        : Tax, Cash
      3. ID
        : USGAAP,
        Description
        : US GAAP
  2. Select
    Setup
    , then
    Clients
    and choose a client basis on the Custom Fields tab.
  3. In the Compilation Letter, replace the words "balance sheet" in the 1st paragraph with the following inline conditional expression:
    [Client.CustomFields.Basis.Value = "US GAAP" ? ("
    balance sheet
    ")][Client.CustomFields.Basis.Value = "Tax, Cash" | Client.CustomFields.Basis.Value = "Tax, Accrual" ? ("
    statement of assets, liabilities, and equity—income tax basis
    ")]
When the client custom field is set to
US GAAP
, the words "balance sheet" are maintained. When the client custom field is
Tax, Cash
or
Tax, Accrual
, the words "balance sheet" are replaced with "statement of assets, liabilities, and equity-income tax basis".

error-icon

Triva isn't available right now.

Check out the support page for our phone number and hours

error-close