Required fields and repeating groups

Imported from previous forum

[ original email was from John Hardman - yiq12@dial.pipex.com ]
I am trying to understand the relationship between required/optional fields and repeating groups so that I can implement code to validate received FIX messages.

Would it be true to say that if there is/are one or more fields within a repeating group shown as “required” that there MUST be at least one occurrence of the repeating group.

Similarly, would it be true to say that if ALL of the fields within a repeating group are shown as “not-required” then there does not have to be an occurrence of the repeating group.

To give examples, in the Market Data Request message (MsgType = V) there are two repeating groups, both containing required fields. For this message I would assume (but am I correct?) that there must be at least one instance of each repeating group (i.e. NoMDEntryTypes <> 0 and NoRelatedSym <> 0).

However, in the Quote Acknowledgement message (MsgType = b) there are two repeating groups, both of which contain only not-required fields. For this message I would assume (but am I correct?) that the message can be used without an instance of these repeating groups (i.e. NoQuoteSets = 0 and NoQuoteEntries not present).

Many thanks in advance for any help,

John Hardman.

[ original email was from Ryan Pierce - rpierce@taltrade.com ]
> Would it be true to say that if there is/are one or more fields within a repeating group shown as “required” that there MUST be at least one occurrence of the repeating group.

This is true. If one or more fields are required in a repeating group, that repeating group is required. I believe just about all repeating groups are preceeded by a count of the number of elements in them, i.e. NoMDEntryTypes and NoRelatedSym. If anything in a repeating group is required, the spec should list the count of elements as required as well. (If not, please post, as it’s likely a typo in the spec.)

Further, although I don’t know if this is stated (but should be), if an element is listed as required in a repeating group, then it must appear in every element in that group. I.e. Symbol is required in the repeating group in Market Data Request, and for each element of the repeating group, you must specify Symbol.

> Similarly, would it be true to say that if ALL of the fields within a repeating group are shown as “not-required” then there does not have to be an occurrence of the repeating group.

I think that is a fair statement.

> To give examples, in the Market Data Request message (MsgType = V) there are two repeating groups, both containing required fields. For this message I would assume (but am I correct?) that there must be at least one instance of each repeating group (i.e. NoMDEntryTypes <> 0 and NoRelatedSym <> 0).

You are correct. You must specify at least one MDEntryType and one Symbol.

> However, in the Quote Acknowledgement message (MsgType = b) there are two repeating groups, both of which contain only not-required fields. For this message I would assume (but am I correct?) that the message can be used without an instance of these repeating groups (i.e. NoQuoteSets = 0 and NoQuoteEntries not present).

I believe that is correct.

Also note that NoQuoteEntries is a repeating group within a repeating group. I.e. a quote set can contain quote entries.

>
> Many thanks in advance for any help,
>
> John Hardman.
>
>
>
>

[ original email was from John Hardman - yiq12@dial.pipex.com ]
I asked the same questions of some of the developers working on FIX products at one of my client sites. They gave me precisely the opposite answers, so clearly the ambiguity in the FIX specification is being interpreted differently by different people. Will this be clarified in the next errata ?

Many thanks,

John Hardman.

> > Would it be true to say that if there is/are one or more fields within a repeating group shown as “required” that there MUST be at least one occurrence of the repeating group.
>
> This is true. If one or more fields are required in a repeating group, that repeating group is required. I believe just about all repeating groups are preceeded by a count of the number of elements in them, i.e. NoMDEntryTypes and NoRelatedSym. If anything in a repeating group is required, the spec should list the count of elements as required as well. (If not, please post, as it’s likely a typo in the spec.)
>
> Further, although I don’t know if this is stated (but should be), if an element is listed as required in a repeating group, then it must appear in every element in that group. I.e. Symbol is required in the repeating group in Market Data Request, and for each element of the repeating group, you must specify Symbol.
>
> > Similarly, would it be true to say that if ALL of the fields within a repeating group are shown as “not-required” then there does not have to be an occurrence of the repeating group.
>
> I think that is a fair statement.
>
> > To give examples, in the Market Data Request message (MsgType = V) there are two repeating groups, both containing required fields. For this message I would assume (but am I correct?) that there must be at least one instance of each repeating group (i.e. NoMDEntryTypes <> 0 and NoRelatedSym <> 0).
>
> You are correct. You must specify at least one MDEntryType and one Symbol.
>
> > However, in the Quote Acknowledgement message (MsgType = b) there are two repeating groups, both of which contain only not-required fields. For this message I would assume (but am I correct?) that the message can be used without an instance of these repeating groups (i.e. NoQuoteSets = 0 and NoQuoteEntries not present).
>
> I believe that is correct.
>
> Also note that NoQuoteEntries is a repeating group within a repeating group. I.e. a quote set can contain quote entries.
>
>
> >
> > Many thanks in advance for any help,
> >
> > John Hardman.
> >
> >
> >
> >
>