This is a problem discovered by my colleague Dave Robinson at Solidsoft:
This is more something to be aware of. I would not necessarily say it was a bug but it’s interesting none the less. We have a map which wants to create an output based on
- One field existing AND
- One field NOT existing
Based on the screen shot below, you can see the “&” functoid forms the creation of the ContactPhones. Behind the scenes the creation of the ContactPhones is done via a for loop “<xsl:for-each select="InputMessagePart_1/Details/Contacts">”
For this instance our output record was created successfully
In the second case where our output was not created, I was scratching my head for a few moments. Basically the map was the same but the order of the inputs into the “&” functoid is the other way round, i.e. the NOT was first. In this case the creation of the ContactPhones is done via the following for loop “<xsl:for-each select="InputMessagePart_0/ns0:FWTOrganisation/ContactPhones">”. In this case, this record does not exist so our output is never going to be created.
So if you are doing something like this, you need to ensure that the first input into the “&” is the field which you want to exist. Otherwise you will not get the expected output.