# Substring in mapping

Hi All,

I have to use the substring function in my mapping.

The mapping requirement is like this

Source field:CustomerName

Target field:3036_2

If the total length of the CustomerName is greated than 35,then the next 35 characters should be assigned to the 3036_2.

But the exact length of the source may not be 70,possibley less than 70.

So the problem occures,I need to mention 2 parameters in the substring function,that is the Start Position and the Character Count.I mention Start Position as 35 but if I mention Characte Count as 34 to make the total length 70,and if the total length of the source is less than 70 then it gives me an exception.

Means what do I need to mention in the Character Count?For the testing payload ,the total source length is 46, so I mention 11.

Please help me.

Thanks in advance