on 08-16-2010 10:14 AM
Hi All,
I have a following mapping requirement
I have to map the target field with the second occurrence of the Source field1 when the source field2=some value and if the second occurrence of the source field is not populated then fill space.
Can you please tell me how can I implement this mapping?
Thanks in advance
I have to map the target field with the second occurrence of the Source field1 when the source field2=some value and if
the second occurrence of the source field is not populated then fill space.
Make use of Index function to check which occurence of the source field it is.
Can you provide your source and target structure (along with the required output)....the requirement is a bit confusing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi VenkataRamesh and Abhishek,
Thanks for the reply.
The actual mapping requirement is like this
Source Structure
Sourcefield1
Sourcefield2
Target Structure
Targetfield1
Targetfield2
Mapping rule for Targetfield1 : Map Targetfield1 with the second occurrence of Sourcefield1 when Sourcefield2=5
and if second occurrence of the Sourcefield1 is not populated that is if it is empty then
fill it with value space
Can you please tell me how can I implement it?
Thanks in advance
Edited by: Shweta Kullkarni on Aug 16, 2010 11:59 AM
Hi,
> Mapping rule for Targetfield1 : Map Targetfield1 with the second occurrence of Sourcefield1 when Sourcefield2=5
> and if second occurrence of the Sourcefield1 is not populated that is if it is empty then
> fill it with value space
Map like below
sourcefield1 -- mapwithdefault node function -- copyValue -- targetfield
Sourcefield1 Context you have to change and double click on copy value and give 1 as input.
or
sourceField1 -- mapWithDefault -- ContexttypeUDF -- targetfield
Context type UDF code
Input as sourcefield1 and this variable name is say a
return a[1];
Regards
Ramesh
User breaking forum rules frequently
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shwetha,
map that variable to the target field in the middle use copyvalue and occurance is 1 (after double click give 1). Context you have to set. if you provide the actual source structure then i can give more details.
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.