Example: Using conditions in XPath expressions
Draft comment:
This topic was viewed 6 times since its publication
Add a condition to evaluate an expression on a field, using
the XPath Expression Builder.
This topic was viewed 6 times since its publication
This example illustrates a simple order processing scenario. Each order contains a field for the age of the order, along with customer information. In this example, we want to identify orders that are older than 14 days.
The business object used in this example
has the structure show below:
Follow these steps to build the XPath expression:

- In the XPath Expression Builder, click Insert Simple XPath.
- In the Simple XPath Expression Builder,
navigate to the orderAge field.

- Notice that the XPath expression is reflected in the Expression field:

- Since orderAge is a not a repeating field, we will add a condition. Expand Add an optional condition.
- Click the Operator field, and click the
arrow to view the list of operators.

- Select the greater than operator (>).
- In the Value field, type 14.
- Press Enter to complete the expression.

- ClickOK to return to the main builder page.
Your completed XPath expression is shown.

- Click OK.
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15