on 05-28-2010 12:37 PM
I had a query that
ET1
TDID
ET2
TDLINE Very
ET2
TDLINE Good
ET2
TDLINE Morning
For this structure if TDID = 09 then it all TDLINE fileds data should be passed to target field u201CTEXTu201D in manner u201D Very Good Morningu201D
Here ET1 is Header and TDID and ET2s are at equal level hirarchy
Regards
Vivek
You need to concatenate all TDLINE values and use condition if TDID = 09 then map all concatenated values of TDLINE to TEXT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> ET2 is 1-1 segment..
>
> and it is replicating based on occurance..
When ET2 is 1-1 then how it is replicating based on what occurrance. It's good if you provide the actual xml structure with occurrance.
Anyway, in order to get your desired result you have to use below UDF.
While creating the UDF set Cache as "Queue"
String output = "" ;
for( int i = 0; i< a.length; i++ )
{
output = output + a<i>;
if ( i != a.length - 1 )
{
output = output + " " ;
}
}
result.addValue(output);
After that do the mapping as shown below.
TDLINE --->RemoveContext--->UDF--->(Put the condition if TDID = 09 Then map the output of UDF to text)-->TEXT.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.