on 06-20-2011 12:25 PM
Hi,
I've got the following file:
field1;field2;field3
FCC is the following:
Recordset streucture: ITEM,*
ITEM.fieldSeparator ;
ITEM.endSeparator 'nl'
ITEM.fieldNames FIELD1,FIELD2,FIELD3
ignoreRecordsetName true
I expect to generate the following XML:
<FIELD1>field1</FIELD1>
<FIELD2>field2</FIELD2>
<FIELD3>field3</FIELD3>
That's working OK. The problem is when I receive a file with the FIELD3 empty. Example:
field1;;
I expect:
<FIELD1>field1</FIELD1>
</FIELD2>
</FIELD3>
But I get:
<FIELD1>field1</FIELD1>
</FIELD2>
And this raises an error during the mapping because the FIELD3 is mandatory in the Data Type definition, even it's empty
Hi Marshal
You can use mapWithDefault in the message mapping to create target element even if source is missing.
Otherwise, you can try using parameter ITEM.missingLastfields = add in your content conversion.
Regards,
Giuseppe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I expect:
<FIELD1>field1</FIELD1>
</FIELD2>
</FIELD3>
But I get:
<FIELD1>field1</FIELD1>
</FIELD2>
use a mapwithdefault in your mapping so that it will always create an empty node if there was no value to be mapped to the target field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
remove ITEM.endSeparator 'nl'
Regards,
Carme
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.