on 12-31-2013 12:27 PM
Hi,
I have a file to proxy scenario where input data structure is like that -
Here, I have an UDF where I am segregating some comma separated value and mapping that to the Record field means if 10 Record comes to the source side then 10 Record field will be created to the target side ----> this thing is working fine.
Now, under this depending on some value what I am getting in the UDF, I have to create that much of energy fields with different values in the Reference and Value field. But this portion is not working .
I am doing this using below given java code in the UDF -
int b = 1;
for (int i=0;i<recordCount2;i++)
{
// this is creating record fields
String s=String.valueOf(i);
result.addValue(s);
midnightdate.addValue(midnightDate[i]);
// this should create energy field ; but not working
for (int r=0;r<maxEnergyTypePlaceHolders;r++)
{
String sp=String.valueOf(r);
energy.addValue(sp);
energyreference.addValue(headerEnergyType[r]);
energyvalue.addValue(energyValue[i][r]);
}
// this is creating checksum
for (int w=0;w<b;w++)
{
String st=String.valueOf(w);
checksum.addValue(st);
checksumreference.addValue(checkSumHeader);
checksumvalue.addValue(checkSum[i]);
}
}
This code is creating Record field properly;
Suppose, in the sender side I am getting 10 records ; then its creating 10 record fields in the target side properly.Suppose under each Record field I have to create 10 energy field but instead of creating 10 energy fields to the separate Record field ,its creating all under 1st Record field ony.
please suggest how to solve this.
thanks in advance.
Hi Apu,
Add Context change (ResultList.CC) after every energy fields.
regards
Gagan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use standard node function splitByValue (each value) as well.
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.