FromLMF map

A similar method can be applied to the FromLMF map to extract data from these sub-fields and map to the output MT message.

The following simple rule can be changed to look for the presence of LocalID and map accordingly:

Rule:
FromLMF_FinInstID_35B ( FinInstID_C Class:TRADDET_LMF_In )

Changed rule:

= IF ( PRESENT ( LocalId_S SubField:FinInstID_C Class:TRADDET_LMF_In ),
FromLMF_FinInstID_AltrntId ( FinInstID_C Class:TRADDET_LMF_In ), 
FromLMF_FinInstID_35B ( FinInstID_C Class:TRADDET_LMF_In ) )

The mapping rules for FromLMF_FinInstID_Altrntid are as follows, assuming an input card name of FinInstid_IR:

FinInstID_C Field Mapping rule
FieldTag
="35"
GeneralFormatOption
="B"
NarrativeVal_S[1]
="/" + TickerSymbol_S SubField:FinInstId_IR + "/" + LocalId_S SubField:FinInstId_IR
NarrativeVal_S[s]
=NarrativeVal_S SubField:FinInstId_IR