When using Python validation rules, the following methods on the typedSegmentObject give you read-only access to typed data within the entire segment. This
allows you to retrieve information from another field other than the one being validated.
The segment Object also behaves differently between parser engines. For details, see segment Object.
The following methods are available for use:
Method
Description
Parser Versions 3.211.245 - 4.5
Parser Version 5.0 and Up
count_of_field()
Returns the number of fields in the current segment.
No differences.
No differences.
field(fieldIndex)
Returns a field object as a typedFieldObject.
When using the (FieldIndex, SubFieldIndex=-1, SubSubFieldIndex=-1) arguments, this method returns a typed validation object.
When using the (FieldIndex, SubFieldIndex=-1, SubSubFieldIndex=-1) arguments, this method returns the same object used in field inbound scripts.