Repeating Groups
Repeating groups allow multiple copies of the same record to be passed through the model.
Example repeating record
declare repeating record Parties {
NoPartyIDs "453" :? NumInGroup
PartyID "448" :? string
PartyIDSource "447" :? PartyIDSource
PartyRole "452" :? PartyRole
PtysSubGrp : PtysSubGrp
}All repeating groups must have a field with type NumInGroup or NoSides.
Customize repeating groups
Add custom fields
extend record Parties {
PartyIndex "10002": int
}Set field optionality/import policy
repeatingGroup Parties {
req NoPartyIDs
req PartyID
req PartyIndex
req PtysSubGrp
}Use repeating groups in messages
message NewOrderSingle {
req Parties valid when it.PartyIndex > 0 && it.PartyIndex < 100
valid when it.PartyID != "N/A"
}More complex validation across nested repeating groups is also supported:
validate {
case(this.Parties.PtysSubGrp.PartySubID)
{None:true}
{Some x : this.Parties.PartyID != x}
}Next: Advanced Features.