You are here: Document Engine > Conditionals > Complex Conditionals

Complex Conditionals

OVERVIEW

Use Complex Conditionals functionality to insert complex condition statements with multiple if...else clauses inline within the content of a document, using the Document Editor and without having to create custom XSL snippets.

Create complex conditionals within the Complex Conditional Expression Editor, using simple filters to set up <if...then> conditional statements.

The content within a conditional can be created in a WYSIWYG editor. All editor functionality such as formatting, text, hyperlinks, images, tables, dynamic data, repeating sections and conditionals are available within this editor.

You cannot insert a complex conditional within a complex conditional.

The page code reflects the conditional in the following format:

<xsl:call-template name="Condition1">< xsl:call-template>

Example Use Case: In the case of headers and footers, if you have to make a change to a logo or perhaps office location information, you can simply make the change in the complex conditional and the information will update in all places that the complex conditional is located.

ADMINISTRATION

ClosedAdding a Complex Conditional

Create complex conditional statements using the Complex Conditional Expression Editor. The <if...else> statements can be Always True or they can be evaluated using simple filters.

  1. Click Admin to go to the Admin Home Page.

  2. Click Documents under Commerce and Documents.

The Document Engine Management Center appears.

  1. Click the name of an existing document, or click the pencil icon for a document and then click Open Document Engine.

    The Document Engine appears.

  1. Double-click the page you wish to edit.
  2. Click Complex Conditionals on the Dynamic tab to open the Complex Conditional Expression Editor dialog box.

  1. Enter a unique name for the complex conditional.
  2. Choose a Category from the drop-down.

    If no Categories are available, or the appropriate Category is unavailable, type a new category name in the text field.
  3. If this complex conditional is Always True, select the box next to Always True. This hides the filters section.

Once a Complex Conditional is saved as Always True, it cannot be changed.

  1. If the complex conditional is NOT Always True, create simple filters:
    • Data Field: Select from the exiting data columns that are in commerce. Click on the field and select from the single-select drop-down.
    • Operator: Select from the list of operators in the field by clicking on this field. The operators enable comparing the data field with the Attribute Value to search for, and generate the filter result.
    • Attribute Value: Specify the value of the data field to filter in this field.
    • Add Row: If you need to add additional rows to filter, click Add Row.
    • Row Grouping (Order of Operations): Use this section to define the full expression logic and logical operations between each attribute. Each row can be referenced by its index number assigned by the system. By default, all condition rows are AND-ed.
      • Click AND ALL to AND all the attributes in the order of their creation (index number).
      • Click OR ALL to OR all the attributes in the order of their creation.
      • Use parentheses to further control the order of operations.
      • You do not need to use any order for your attribute indexed while defining the order of operations. The attribute indexes can be referenced multiple times in the order of operations to define the correct condition. The order of operation defined is validated by the system when you click Create.

  1. Format text, insert hyperlinks, images, tables, dynamic data, repeating sections, and conditionals within the Clause Content section.

    This functions similarly to the WYSIWYG editor used throughout Document Engine.

    You CANNOT insert a complex conditional.

  1. Click Create.

  1. Click the pencil icon to add the Clause Content for the "Else" statement.

  1. Format text, insert hyperlinks, images, tables, dynamic data, repeating sections, and conditionals within the Clause Content section.

    This functions similarly to the WYSIWYG editor used throughout Document Engine.

    You CANNOT insert a complex conditional.

  1. Click Save.


ClosedUsing the Complex Conditionals Library

The functionality of Complex Conditionals provides the ability to insert complex condition statements with multiple if...else clauses inline within the content of a document, using the Document Editor and without having to create custom XSL snippets.

Once you have created a complex conditional, it is stored in the Complex Conditional Library. The Complex Conditionals Library is part of the Dynamic Data feature.

  1. Click Admin to go to the Admin Home Page.

  2. Click Documents under Commerce and Documents.

The Document Engine Management Center appears.

  1. Click the name of an existing document, or click the pencil icon for a document and then click Open Document Engine.

The Document Engine appears.

  1. Double-click an item in the Flow tab to edit it.

The item opens in editing mode.

  1. Click Dynamic Data on either the Product List or Dynamic toolbar.

    The Dynamic Content dialog box appears.

  1. Click the Complex Conditionals tab in the Dynamic Content dialog box.

ClosedSearching the Complex Conditionals Library

  1. Search the library for your complex conditional by entering the entire name or part of the name in the Find field.
  2. Narrow down the complex conditionals by category by selecting categories in the drop-down.
  3. Click Search to list all complex conditionals that meet your search requirements.

  1. Select the complex conditional you searched for.

    You can edit or delete the complex conditional, or insert it into your page.

ClosedInserting a Complex Conditional


ClosedPlacing Tables back into Conditionals

If a Table somehow ends up residing outside of the Conditionals they were created in, follow these steps to easily replace Tables within Conditionals.

This allows you to recreate the Conditional instead of the entire Table.

  1. Click within the Table that has slipped outside of the Conditional.

    The level at which you are editing appears at the bottom of the Document Engine, as Node Selector buttons.

  2. Click <Table> to select the entire table.
  3. Select the Dynamic tab.
  4. Click the Conditional button.
  5. Enter the conditions under which you'd like the table to appear.
    1. Tables cannot be copied and pasted.

NOTES

RELATED TOPICS

Related Topics Link IconSee Also