on 03-27-2009 12:35 AM
Hi everyone,
We have a requirement where suppose if the quantity in the source structure is 2, then a node or line in the target structure has to repeat 2 times.
It it is 3 the target node shoud repeat 3 times.
so
Qty = 3.
056056
056056
056056
Please let me know if you know any suitable solution for this one.
Vinotha M
use an advanced UDF.
input to the UDF will be the source field that will have the value
say a is the input to the UDF then the code will be something like;
int length = Integer.parseInt(a);
for(i=0; i<length;i++)
{
result.addValue("");
}
that will do the trick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there anything taht has to be done on the configuration Side as well..
Because without this UDF everything seems to be working fine.
When we put this UDF to create mutiple target nodes, we get thsi error in Communciation channel.
Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Column value '0000000000' too long (>2 for 5. column) - must stop', probably configuration error in file adapter (XML parser error)'
Without the UDF in mapping it there is no issue.
Vinotha M
The FCC and the Data structure is very huge to be pasted here.
But I htink i spotted the problem, It is that the value that has to be repeated has to be used in the UseOneAsMany functionality..
But it does not hvr any context since it is based on just one of the source fields.
Please help me with this
Thanks,
Vinotha M
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.