on 01-27-2015 9:15 AM
Hi everybody,
There are 3 cargo rates 8,18,18 for cargo and their vaues will come .Also a flag will come for other rate 18. and Just one of them can come or 3 of them can come. But I have to create a node for nonexisting cargo rate . for example,
Source:
<root>
<cargorate>8</cargorate>
<value>120.0</value>
</root>
Target
<root>
<cargorate>8</cargorate>
<value>120.0</value>
</root>
<root>
<cargorate>18</cargorate>
<value>0</value>
</root>
<root>
<cargorate>18</cargorate>
<value>0</value>
</root>
I tried to do with graphical mapping but it is not worked.
How can I write a UDF for this problem or can it do with graphical mapping ?
Hi,
How does the Graphical Mapping look like that you tried to get it working?
Will quickly try and do it in a Graphical Mapping.
Regards,
Jannus Botha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ceren,
If you can edit target structure. Make InvoiceTaxLine occurrence as 3. Then map all fields with mapWithDefault.
If it does not work, please try below UDF. Screenshots attached.
for(int i=0; i<tax.length; i++){
if(tax[i].equals(ResultList.CC)){
InvoiceTaxLine.addValue(""); InvoiceTaxLine.addValue(""); InvoiceTaxLine.addValue("");
InvoiceTaxLine.addValue(ResultList.CC);
}
}
InvoiceTaxLine.addValue(""); InvoiceTaxLine.addValue(""); InvoiceTaxLine.addValue("");
InvoiceTaxLine.addValue(ResultList.CC);
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.