Show TOC

 Conditions Locate this document in the navigation structure

Use

This function enables you to define conditions that control whether a certain format tree node is processed during file generation or conversion.

You can define conditions for any node type for outgoing files . If one condition applies to several consecutive elements, you should define a composite. If you assign a condition to a segment or a composite, it applies to the corresponding subtree. In this way, for example, you can control that a complete record (a segment, including all its elements defined as subnodes) is not output to the file.

For incoming files, you can only define conditions for elements, action nodes, or technical nodes.

Activities

You define a conditional relationship for a node in the detailed view under Conditions , which displays a condition list that looks like this:

Arg1-1

Arg1-2

Type

Operator

Arg2-1

Arg2-2

Type

Operator

x

x

x

x

x

x

x

x

The first part of the argument is defined by the first four fields, and the second part by the last three; the fourth field is the linking operator to the next condition line, if you define one. You fill out this condition list as follows:

Field Name

Required Entry

Arg1-1

Here you specify field 1 of the first part of the condition argument. This can be a constant, a source structure, or a reference ID (of another node already defined in the format tree).

If a comparison value is a constant other than a numeric value, then you must enter it enclosed in single quotation marks, like 'EURO' in the example below.

Arg1-2

Here you specify field 2 of the first part of the condition argument. If, in Arg1-1, you entered a:

- Constant, then leave this field blank.

- Structure field, then enter the field name (which you can take from the source field inventory).

- Reference ID, then enter the node attribute of the referenced node that you want to check.

Type

Enter the type of argument for the first part of the condition argument:

1 = constant 2 = field in source structure 3 = reference ID

Operator

Enter the operator to be used for the comparison, such as equal to (=) or less than (<).

For more information on possible logical operators in the condition, see Comparing Strings .

Arg2-1

Here you specify field 1 of the second part of the condition argument. Like the first part, it can be a constant, a field in a source structure, or a reference ID.

Arg2-2

Here you specify field 2 of the second part of the condition argument. The same dependencies apply as for Arg1-2 above.

Type

Enter the type of argument for the second part of the condition argument. The same values apply as for the first part of the argument.

Operator

Here you enter the linking operator to establish the logical operation (AND or OR) between two condition lines (only necessary if you have two condition lines).

When a file is generated from one of the predefined applications, the system processes the format tree and checks each node for conditions. If a condition is met, the system processes the node; if it is not, the node is ignored.

This graphic is explained in the accompanying text.

If a condition for an upper-level node is not met, all subnodes are also ignored during processing.

Examples

Format tree LM03 (tree type PAYM) is used to generate DME files for domestic payments in Finland. The following examples illustrate the use of conditions at the element and segment levels.

Element Level

Within the batch record, a currency value is to be filled, which is represented by an element called Currency : it should be filled with a constant, 1, if the currency read from the system field WAERS is EURO, and 0 if it is FIM (Finnish Markkaa) – defined at the element level with the mapping procedure Constant . This is modeled in the format tree as two atoms beneath the Currency element, each one establishing a condition:

EURO (if condition is met, the format tree fills the constant 1)

Arg1-1

Arg1-2

Type

Operator

Arg2-1

Arg2-2

Type

Operator

FPAYHX

WAERS

2

=

'EUR'

 

1

 

FIM (if condition is met, the format tree fills the constant 0)

Arg1-1

Arg1-2

Type

Operator

Arg2-1

Arg2-2

Type

Operator

FPAYH

WAERS

2

=

'FIM'

 

1

 

Segment Level

Further along in the batch record, conditions are used to determine which segment is to be output. In the segment group Transaction Record , under Specification Record , the tree contains two segments: Specification Transaction Record 1 and 2 .

LM03 outputs segment 1 if the value in structure FPAYP, field WRBTR (amount in foreign currency with +/- signs) is greater than 0. If it is less than or equal to 0, this entire segment including its subnodes is ignored, and segment 2 is processed instead.