TransEditor Conditions

Use this page to create or modify input conditions for a TransEditor. Input conditions evaluate Input XML elements to test for one of the following:

  • Comparison to a constant you specify.
  • Comparison to the value of another element in the transaction.
  • Comparison to a math expression including one or more elements.
  • Evaluation of whether the contents of the element are in, or not in, a specified Reference Lists.

A variety of operators are provided to enable complex comparisons.

Input conditions must be satisfied in order for any associated action to be applied or for child conditions to be tested. In addition, conditions are organized in a hierarchical fashion to enable AND/OR relationships. For information about nesting conditions, please review TransEditors.

Operators in comparison statements

When using the LIKE operator in a comparison, the % and _ special characters are mapped to the period (.) character and cannot be escaped. Other special characters can be evaluated as regular expressions, or, if you want to evaluate them literally, you can escape them with the \ character.

Evaluating strings

When evaluating the contents of any element defined as a string (such as all custom attributes) using <, <=, >, or >=, Determination will perform a type conversion to attempt to match the type of the Element to that of the Value Element or Constant. This enables you to pass in numbers, dates, or strings in custom attributes and perform comparisons such as <ATTRIBUTE39> <= 2007-03-05, or <ATTRIBUTE10> > <ATTRIBUTE11>. For more information, see Custom Attributes.

Before using this page for the first time, review TransEditors.

Configuring Conditions

Use data in the TransEditor Conditions Field Reference below to enter data in required and optional fields.

Add a condition for a TransEditor

  1. Select the desired TransEditor on the List TransEditors page.
  2. Select Add Condition from that page's Actions menu. A blank TransEditor Conditions page appears.
  3. Enter the condition using the field reference below.
  4. Click Submit to save your changes.

Add a Sibling or Child Condition

  1. If it is not already selected, open the List TransEditors page and select the condition for which you want to create a sibling.
  2. Select Add Condition from the Actions menu. A blank TransEditor Conditions page appears.
  3. Enter the condition using the field reference below.

    Consider the following when configuring conditions:

    • Choose the -Top Level- parent condition to create a sibling (OR) condition. In this case, either condition evaluating to TRUE makes the entire statement TRUE.
    • Choose a different parent condition to create a child (AND) condition. In this case, both parent and child conditions must evaluate to TRUE or the entire statement is FALSE.
  1. Click Submit to save your changes.

Edit the currently-selected condition

  1. Modify the data.
  2. Click Submit to save your changes.

Delete the currently-selected condition

  1. Select Delete Condition from the Actions menu.
  2. Click OK to confirm the deletion.

TransEditor Conditions Field Reference

Field

Req?

Description

Element / Expression

Y

The element from which to compare the condition, or a math expression containing one or more elements. For a list of valid examples of elements and expressions, see How Conditions Work in TransEditors.

Math is applicable in this field using the same set of operators as the Value Element/Expression row (see below in this table).

To select an element:

  1. Begin typing the name of the element.
  2. Select the desired element from the pop-up list.

For example, you could type ship_f to display a list of Ship From elements from which to select.

If you do not see the desired element, you may need to enter more characters; for example, ship_from.city to display the INVOICE.SHIP_FROM.CITY and LINE.SHIP_FROM.CITY elements.

Value Element / Expression

Y,
if Constant is not selected

An element, or a math expression containing a numeric-type element, whose value can be compared with the value of the Element / Expression listed above, or a list of valid examples of elements and expressions, see How Conditions Work in TransEditors.

  1. Click the Element radio button.
  2. Begin typing the name of the element.
  3. Select the desired element from the pop-up list.

For example, you could type ship_f to display a list of Ship From elements from which to select.

If you do not see the desired element, you may need to enter more characters; for example, ship_from.city to display the INVOICE.SHIP_FROM.CITY and LINE.SHIP_FROM.CITY elements.

To create a math expression, use only the +,-,*, or / operators and ensure that the element you are including in the expression is a numeric-type element, such as GROSS_AMOUNT or USER_ELEMENT.

Constant

Y,
if Value is not selected

A constant whose value can be compared to the value of the Element / Expression listed above. Click the Constant radio button and enter a constant in the Value Element / Expressionfield.

When comparing against an element of type date, such as <INVOICE>.<INVOICE_DATE>, you must enter the date in one of the following formats: MM-DD-YYYY, YYYY-MM-DD, or MM/DD/YYYY.

Reference List

Opt.

A Reference List whose contents can be compared to the value of the Element / expression listed above using the EXISTS IN or NOT EXISTS IN operators. Click the Reference List radio button and select one of the configured lists. For more information, see Rule Qualifiers.

Parent Condition

Y

Condition with which an AND relationship should be established. Choose –Top Level- or a level already containing a condition to create an OR relationship between conditions at that level. The default is Top Level.

TransEditor Conditions Field Reference - Operators

Operator (Required)

Description

!= Tests an element/expression for whether it is not equal to the constant or the value element/expression.
< Tests an element/expression for whether it is less than the constant or the value element/expression.
<= Tests an element/expression for whether it is less than or equal to the constant or the value element/expression.
= Tests an element/expression for whether it is equal the constant or the value element/expression.
> Tests an element/expression for whether it is greater than the constant or the value element/expression.
>= Tests an element/expression for whether it is greater than or equal to the constant or the value element/expression.

IS EU

Tests an element for indication of EU membership.

  • If the element contains a country name, ISO code, or two- or three-character country code that maps to an EU member on the specified <INVOICE_DATE> for the transaction, returns TRUE.
  • If the element does not contain a mapping to an EU member, or if <INVOICE_DATE> is null, returns FALSE.

IS GCC

Tests an element for indication of GCC membership.

  • If the element contains a country name, ISO code, or two- or three-character country code that maps to a GCC member on the specified <INVOICE_DATE> for the transaction, returns TRUE.
  • If the element does not contain a mapping to a GCC member, or if <INVOICE_DATE> is null, returns FALSE.

IS NOT EU

Tests an element for indication that the country is not an EU member.

  • If the element contains a country name, ISO code, or two- or three-character country code that maps to a non-EU member on the specified <INVOICE_DATE> for the transaction, returns TRUE.
  • If the element does not contain a mapping to a non-EU member, or if <INVOICE_DATE> is null, returns FALSE.

IS NOT GCC

Tests an element for indication that the country is not a GCC member.

  • If the element contains a country name, ISO code, or two- or three-character country code that maps to a non-GCC member on the specified <INVOICE_DATE> for the transaction, returns TRUE.
  • If the element does not contain a mapping to a non-GCC member, or if <INVOICE_DATE> is null, returns FALSE.

IS NOT NULL

Returns FALSE if the element is null, TRUE if the element contains any value.

IS NULL

Returns TRUE if the element is null, FALSE if the element contains any value.

LIKE

NOT LIKE

These operators use wildcard characters to help perform string pattern matching. Two wildcard characters are used:

    • %: match any number of characters.
    • _: match any single character.

If no wildcards are used, the behavior is exactly like the = operator.

These operators are only effective for string elements.

EXISTS IN
NOT EXISTS IN

These operators are only active for reference list comparisons.

EXISTS IN returns true if the value contained in the specified element is contained in the specified reference list.

NOT EXISTS IN returns true if the value contained in the specified element is not contained in the specified reference list.

These operators are only effective for string elements.