cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue : Display only last 6 digits from input value

Former Member
0 Kudos

Hello All,

I have a requirement like, have to map only last 6 digits from the input value to a target field.

For ex : ABC123456 Output should be 123456

ABC123DEFGHI456 Output should be GHI456.

I tried with graphical mapping tools but It is not giving suitable output for all the cases.

Any inputs are appreciated.

Thanks in advance.

Regards

Hari

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey

Just write a simple UDF


String str = a.substring(a.length()-6, a.length();
return str;

Thanks

Aamir

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi!

Use the substring function in graphical mapping.

e.g. substring(5,10) creates the content in target field beginning on position 5 and with a length of 10 of source field content. As far as I remember the numbering begins with 0 for 1. character in source field.

Thsi should work!

Regards,

Volker