You are here: Document Engine > Editors > Expression Editor

Expression Editor

OVERVIEW

The Expression Editor is used to edit XSL expressions within a document. It allows the user to manipulate page elements using XSL functionality without having to resort to full-fledged coding.

ClosedUsing the Expression Editor

Each variation of the expression editor is customized to support the specific document component.


ClosedVariations of the Expression Editor

There are three variations of the Expression Editor:

ClosedLoop Expression Editor

The Loop Expression Editor is used to define and edit a loop without having to resort to any coding. Loops can be edited within a page or a document.

ClosedInserting a Loop

ClosedEditing a Loop

ClosedExample: Inserting a Loop

  1. Output a list that contains the Part Number of all Part Type Line Items with Lead Time less than 5 days OR Part Base Price less than $100.
  2. Specify What Data you want and how it will be displayed (build the table).
  3. Create a list.

    For the list element, specify a dynamic place holder for Part Number since this is the field you want to display in your list.
  4. Populate the fields you want with the right data from the Transaction (build the loop).
  5. Select the list that you created above and launch the Loop Expression Editor by clicking Repeating Section in the Dynamic Data tab.
  6. Follow the steps listed above for "Inserting a Loop"
    • For Loop Over: Choose Part Line Items.

      This creates a loop that iterates through all the part type line items in your transaction.
    • For Sort By: Choose Part Number.

      This sorts the results in alphabetical order.
    • Create a filter that returns part line items with lead times less than 5 days or part base price less than $100:
      • Choose the first data field as Lead Time. Specify that Lead Team < 5.
      • Choose the second data field as the User Currency Preference. Specify that Currency Preference = USD.
      • Choose the third data field as Part Base Price. Specify that Part Base Price < 100.
      • In the Row Grouping field, group the conditions like this: (1 OR (2 AND 3)).

ClosedConditional Expression Editor

This editor helps in specifying and editing conditions for the selected area in the page or document. If the condition is met, then the selected node(s) will be hidden in the output.

ClosedDefining a Conditional

ClosedAdding an ELSE Clause

ClosedExample: Conditional Formatting

  1. Name the section: "For California Buyers" - use the rich text editor to author the content.
  2. Hide the section: Select the "For California Buyers" text and launch the Conditional Expression Editor.
  3. In the Data Fields, choose the CRM Attribute "Buying State Province".
  4. Specify the condition "Buying State Province = California".

ClosedData Formatting Expression Editor

Use the Data Formatting Expression Editor to define and edit the format for dynamic data without having to use any coding.

ClosedDefining a Format

ClosedCurrency Formatting

ClosedExample: Data Formatting



ADMINISTRATION

Formatting Expression Editor Parameters:

When defining a format in the Formatting Expression Editor, use the tree drop-down to select the function(type) to be applied to the data. This function will be applied to the dynamic data from the commerce XML. The result of applying the function on the data is displayed on the output.

ClosedGeneral Functions


ClosedString Functions


ClosedNumeric Functions

Most of these functions are standard XSLT functions. Detailed documentation on parameters can be found on XSLT reference web sites such as: http://www.devguru.com/technologies/xslt/home


ClosedDate Functions

There are no predefined functions available to format dates as dd.MM.yyyy or dd/MM/yyyy. Write custom XSL to achieve this formatting.


NOTES

RELATED TOPICS

Related Topics Link IconSee Also