Document Designer Conditions

Overview

Conditions can be placed on Layouts and Elements so that the content will only appear in the output if a logic statement evaluates to true.

Administration

ClosedWhere Conditions can be Placed

Conditions can be placed on the following components:

  • Heading
  • Spacer
  • Page Break
  • Column Break
  • Sections
  • Text Elements
  • Image Elements
  • Table Elements
  • Table rows
  • Table columns
  • XSL Snippet Elements
  • Embed Document Elements

ClosedAdding a Condition

To add a Condition to an applicable component:

  1. Select the component that the Condition will be added to.
  2. Click the Condition button (Condition button) in the Dynamic Content Bar.

    The Condition window appears.

  1. Begin typing the Condition. As you type, a combination of literal values, operators, User Attributes, and Main Document Attributes will be suggested. When the desired component is suggested in the list, click it to add it to the Condition.

    Conditional dialog

  1. Continuing adding components to the Condition until the expression is logically complete.

    Condition

    In this example, the component that has the Condition applied to it will only show in the output if the value of the Main Document Total attribute is greater than or equal to $10,000.

    When evaluating a Boolean attribute in the Condition Editor, the equal (=) symbol only compares one attribute to another, such as Bool1 = Bool2.

    To evaluate if Bool1 is true, put Bool1. To evaluate if Bool1 does not equal true, use not(Bool1) or not Bool1.
  1. Click OK to save the Condition.

    A Condition icon is added to the component in the Template Flow.

    Section

  1. Click the Condition icon on the component, or the Condition button in the Dynamic Content Bar when the component is selected, to modify or delete the Condition.
Sub-Document Attributes can be used in a Condition if the Condition is on an Element that is within a Loop.

ClosedAdding a String Function

Administrators can use newly supported string functions, date functions, and a between function for numbers.

String Functions

Oracle CPQ supports the following string functions in conditions and loops.

Function

Returns

Details

contains (string1, string2)

Boolean

Search string1 for existence of string2

isNumber(string)

Boolean

Returns true if string is numeric

startsWith (string1, string2)

Boolean

Checks whether string1 starts with string2

endsWith (string1, string2)

Boolean

Checks whether string1 ends with string2

isBlank (string)

Boolean

Returns true if string is empty, blank, or null

Date Functions

Oracle CPQ supports the following date functions in conditions and loops.

Function

Returns

Details

isBefore (date1, date2)

Boolean

Returns true if date1 is before date2

isAfter (date1, date2)

Boolean

Returns true if date1 is after date1

equals (date1, date2)

Boolean

Returns true if date1 is equal to date2, including time

equalsIgnoreTime (date1, date2)

Boolean

Returns true if date1 is equal to date2, ignoring time

dateBetween (date1, date2, date3)

Boolean

Returns true if the value to check is between start of range and end of range (inclusive)

Between Function for Numbers

Oracle CPQ supports a between function for numbers in conditions and loops.

Function

Returns

Details

between (number1, number2, number3)

Boolean

Returns true if number1 is between number2 and number3


ClosedAdvanced Conditional Editor

Administrators can convert a Simple condition to an Advanced Conditional that displays in XSL format. An Advanced button displays on the Conditional dialog. After opening the dialog, administrators can go directly to Advanced mode by clicking the Advanced button.

The following image displays a Conditional dialog without a Simple condition.

Conditional dialog

If a Simple condition does not exist in the Conditional dialog, clicking Advanced will load the Advanced Conditional dialog with no XSL content.

Advanced Conditional dialog

When the Conditional dialog contains a Simple condition, administrators can click Advanced to convert the Simple condition to XSL. The following figure shows a Simple condition.

Advanced dialog with Simple condition

The Advanced Conditional dialog shows the Simple condition converted to XSL. The administrator can return to the Simple condition that displays in the Conditional dialog (shown above) by clicking Simple.

Advanced dialog with converted Simple condition

Note: Changes to Simple conditions carry over to the Advanced version of the condition, but changes to Advanced conditions do not carry over to Simple conditions.

Related Topics

Related Topics Link IconSee Also