Skip to Content
0
Former Member
Dec 27, 2007 at 02:10 PM

StringIndexOutOfBoundsException

15 Views

Hello

i am trying to implement simple functionality of substring of one value of source node using built-in functions of mappings.

The logic is simple

If ZNME1 > 15 .

ZNME1 = Substring from 0 to 14.

Else.

ZNME1 = ZNME1.

Endif.

Instead of this code i have used built-in if then else functions. This runs fine (when tested with Test tool) when the result is true i.e. when string length is greater than or equal to 14 but if stringlength is less than 14 it gives the above exception.

i guess it executes the substring function (which is assigned to then tab) before even checking the condition which is why it is throwing this error. ideally it should first check the condition and then execute then part of the same right.

Regards

Rajeev