Sometimes, you want to skip a field mapping when running a message. You can use a condition that is defined as an expression to indicate if the field mapping must be applied. The field mapping is only applied if the expression condition is met.

You define an expression with self-defined variables. Variables must be linked to fields from the source document or the target document.
Example:
Expression: Value1>Value2Condition value: IF(Value1>Value2, true, false)Variables:
  • Value1 is linked to SalesPrice field of the SalesLine source record.
  • Value2 is linked to LineAmount field of the SalesLine source record.
The field mapping is only applied if the sales price is higher than the line amount.


Standard procedure

1. Click Connectivity studio Integration Design.
2. On the Message tab, in the list, find and select the desired message.
3. Click Edit.
4. In the Mapping section, in the Target record list, find and select the desired record.
5. On the Mapping tab, on the Field mapping tab, in the list, find and select the desired field mapping.
6. In the Use condition field, select 'Expression'.
7. Click the Field condition tab.
8. In the Expression field, enter the expression, using variables.
9. You can invert the condition of the expression. By default, if the expression condition is met, the record mapping is applied. If you invert the expression condition, the record mapping is applied if the expression condition is not met.
  Select Yes in the Invert condition field.
10. Sub-task: Define variables.
  10.1 Add a variable line for each variable that is used in the expression.
  Click New.
  10.2 In the Variable field, type exactly the variable name as used in the expression.
  10.3 Define if the variable is linked to a field in the source document or target document.
  In the Record origin field, select an option.
  10.4 Define the document record to which the variable is linked.
  In the Record field, enter or select a value.
  10.5 Define the document record field to which the variable is linked.
  In the Record field field, enter or select a value.
 

Note: The field type, as defined for the document record field, is shown as well.

  10.6 You can indicate how the variable value must be handled in the expression, regardless of the document record field type.
  In the Variable type field, select an option.
  10.7 You can define the language in which the variable is expressed.
  In the Language field, type a value.
11. Close the page.

Notes

Applying expression conditions can influence the message performance. So, only apply an expression condition if required and keep it as simple as possible.

Provide feedback