on 09-24-2008 10:17 PM
Hi all,
I have a scenario for mapping with
SOURCE:
|--Field Name
|--Field Value
|--Item Number
|--Sequence
TARGET:
|--ItemNumber
|--Text
I need to map all the Field values of source with Field Name as 'XBT' and concatenate them together in Sequence having Same Item Number and put that to Target Item Number and Text.
Can any body please suggest how to do that? Any help will be really appriciated.
Thanks
-Kulwant
Hi,
For Parent target node you are required logic,
Use IfWithoutElse function. Check whether FieldName is 'XBT',using Equals function.
Make Keeps TRUE for for IfWithoutElse function.
Map one to one for ItemNumber
Map text by using concat function and all other source fields.
U don't required any further logic for child element.
Regards,
Rohit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Thanks. I have got the answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kulwant,
You can also do it by using a UDF in graphical mapping:-
String str = "";
for(int i = 0 ; i < FieldName.length ; i++)
{
if(FieldName<i>.equals("XBT"))
{
str = str + FieldValue<i>;
}
}
result.addValue(str);
This should work for your requirement for field value.
Item number can be mapped directly.
Regards,
Sami
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is this your requirment..??
Input FIle
Field Name Field Value Item Number Sequence
XBT XYZ 1 1
Field2 ABC 2 2
XBT ABC 1 3
OutputFile
ItemNumber Text
1 XYZABC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.