cancel
Showing results for 
Search instead for 
Did you mean: 

Description field long - need to map it to different target nodes depending

Former Member
0 Kudos

Hello,

In my mapping, if my source description field size is greater than 120 characters, then i need to map target field's element 'A' with first 70 characters and element 'B' with remaining characters.

else if its less than 120, map all characters to element A.

Thanks,

Vishal

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

UDFs to the help...

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hello,

>

> In my mapping, if my source description field size is greater than 120 characters, then i need to map target field's element 'A' with first 70 characters and element 'B' with remaining characters.

>

> else if its less than 120, map all characters to element A.

>

> Thanks,

> Vishal

use a UDF,

for element A

if(a.length() > 120)
{
return a.substring(0,70);
}
else
{return a;}

for element B

if(a.length() > 120)
{
return a.substring(70,a.length());
}