Logic on NoOfComplexEventSchedule Field

I’m trying to work with my development team to model FX TRF (Target Redemption Forward) fields.

I’m trying to build a logic where the NoOfComplexEventSchedule field within the Complex Event group - ComplexEventScheduleGrp should look at the Fixing Schedules (multiple schedule with Start dates and end dates) from the source file and count the fix schedules. However the FIX schema only allows counting the FIX tag 41032 and displaying the count in the field NoOfComplexEventSchedule. Is this a logic which is part of the schema and cannot be changed? Can we look at the source data and determine the count?

Appreciate any help on this please.

Thank you
Abde Rangwala

Not sure I fully understand the question. The repeating group ComplexEventScheduleGrp contains one or more schedules each of which must have a start date and may have an end date. The number of such start/end date pairs is captured in the NumInGroup field NoOfComplexEventSchedules(41031).

As the start date is mandatory, the count of this field is identical to the count of all schedules, i.e. instances of the repeating group. Could you provide an example of the group that shows the issue?

Thank you @hanno.klein

Sorry for the delay in response.

I’ll explain this in a bit of detail.
Uusually the count field : NoOfComplexEventSchedules(41031), the count logic will be - use countFunction(Var1) Var1=ExecutionReport/Instrument/ComplexEvents/ComplexEventPeriodGrp/ComplexEventScheduleGrp^41032.

However, my question is - Can we change this count logic to look at a field (i.e. ) coming in from a Trading platform instead and do the count based on blocks in the file. Is this logic sustainable or this is not a FIX defined limitation.

Thanks
Abde

@abdemanaf46, the value of the counter field of a repeating group must correspond to the number of instances of the repeating group. Otherwise a tag=value parser will run into a parsing error. The spec of tag=value says:

In tagvalue encoding, repeating group instances are preceded by a count of the number of instances to follow. The count is serialized as a FIX field with a value of datatype NumInGroup , commonly referred to as a NumInGroup field.

I am not sure what you mean with “do the count based on blocks in the file.”. Is a block something other than a repeating group instance? Then it is not possible to use NoOfComplexEventSchedules(41031). The solution would be to add a user-defined field (e.g. NumOfBlocksInSchedule) outside of the repeating group to hold the number of blocks contained within the repeating group.

FIX fields counting something other than repeating group instances usually have a name starting with “NumOf”, e.g. NumOfSimpleInstruments(1606), to distinguish them from technical counters starting with “No”.