Skip to Content
0
Former Member
Nov 22, 2006 at 08:30 AM

copyValue more robust

21 Views

Dear all,

I am facing a problem with function copyValue. I've got a case where I need to use it but in certain cases, the field is not present and then it throws an error. So I thought I can use a user defined function e.g.

if (value.length >0)

result.addValue( value[0]);

to do the trick. However, It seems it doesn't work as the standard function. I am always getting "SUPPRESS" as first value in the queue and it doesn't create the node. Is there a way to remove the "SUPPRESS" from the queue?

My source structure:

<message>

<field1/

<substructure>

<xxx/>

<yyy/>

</substructure>

</message>

target structure

<message>

<loop>

<field1/>

...

</loop>

</message>

Any idea highly appreciated.

Thanks,

Jens