cancel
Showing results for 
Search instead for 
Did you mean: 

Get the substring from main string with runtime value has the parameter

Former Member
0 Kudos

Hi folks

i have an issue please help me out. I need to get the substring from a string with runtime time value. In Mapping we have substring function,but their we have to defined it with a predefined parameter but for me it should take the runtime value from other function and get the substring, So guys please advise me.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Go for UDF.

Choose 2 arguments:

var1 type : Int

var2 type:String

String s = var2.substring(0, var1);

return s;

(modify it according to ur req)

Thanks

Amit

Former Member
0 Kudos

Thanks Amit. I am getting the value.

Cheers Mate.

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Rajesh,

suppose if your string is "abc12345" in this case what value you are seding to target system, tell me your substring starting position and ending position.

Regards,

Raj

Former Member
0 Kudos

Hi Raj

Suppose i am passing abc12345 my runtime value would be 5 at that moment ,it has to fetch the substring from staring position to 5 and return abc12.

Regards

Rajesh

former_member208856
Active Contributor
0 Kudos

In this case, use standard function from TEXT --> Substring

&

Give Start Position 0 & character count 5.