There are various types of conditions that you can use to evaluate an XPath expression.
The most common operator used to evaluate an expression is = (equals), but you can use any valid XPath operator. See Basic XPath Expressions for a list of valid XPath operators.
The following examples demonstrate how to use various conditions to evaluate an XPath expression.
String literals must be enclosed in quotation marks as shown in this example:
bpws:getVariableData('PatientInfo')/PV1/Department = 'ICU'Use the bpws:getVariableData function to access variable data
Using string literals in the getVariableData function:
The following example evaluates string nodes from two variables. The variable names in the bpws:getVariableData function are string literals.
bpws:getVariableData('PatientInfo')/PV1/Department = bpws:getVariableData('Orders')/PID/PtDeptUsing numeric literals in the getVariableData function:
To evaluate numeric literals you must cast either one or both sides of the expression. For example:
number(bpws:getVariableData('PatientInfo')/PV1/Department) = bpws:getVariableData('Orders')/PID/PtDept
- OR -
number(bpws:getVariableData('PatientInfo')/PV1/Department) = number(bpws:getVariableData('Orders')/PID/PtDept)
Numeric literals do not require quotation marks. Placing quotes around a numeric literal transforms it into a string literal.
Valid numeric expression example:
bpws:getVariableData('PurchaseOrder')/PurchaseOrder/POTotal >= 5000.00
Invalid numeric expression example:
bpws:getVariableData('PurchaseOrder')/PurchaseOrder/POTotal >= '5000.00'