Expanding/collapsing swift fields, Xpanding, Ollapsing – BEA SWIFT Adapter User Manual

Page 104: Swift, Ields

Advertising
background image

In some cases validation may need to be specified for a ‘sub-field’ of a field. For e.g.
for field ‘mir’ (tag 106) validation needs to be done for sub-field ‘date’. It is specified
as shown below

<SwiftSystemFieldDef Name="mir" Tag="106">

<Format>(6!n)(4!a2!a2!c1!c)(3!c)(4!n)(6!n)</Format>

<Specification>(date)(lt-identifier)(branch-code)(session- number)(isn)

</Specification>

<Description>MIR containing:

a) Input date

b) Input LT including branch code

c) Session number

d) ISN

</Description>

<Validations>

<Validation>

<subfield>date</subfield>

<formula>IsDate($value,"yyMMdd")</formula>

<error-code>V04</error-code>

<actionmessage>"Invalid Input Date '" + $value + "'"</actionmessage>

</Validation>

</Validations>

</SwiftSystemFieldDef>


While specifying validations for sub-field, in the ‘Validation’ tag, tag ‘subfield’ must
be added. The value of this tag should be the name of the sub-field for which
validation needs to be applied.

Note:

The field value can be accessed only using the ‘$value’ literal.

If the name of a sub-field is changed and validation has been specified for it, the

‘subfield’ tag needs to be updated correspondingly.


See Also:

Specifying Validations for a Field

Expanding/Collapsing SWIFT Fields


Many SWIFT messages are very large and it is difficult to view the entire message in
the External Format UI table. The user can expand/collapse fields so that message
part in which he is interested in can be viewed in the External Format UI table.

Advertising