cancel
Showing results for 
Search instead for 
Did you mean: 

How to Check the input values is Is Alpha or not???

Former Member
0 Kudos

Hi All,

I want to check whether the incoming value is Is Alpha or not.

Please any one provide me UDF for this

Thanks in Advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

closing thread to open new thread

rajasekhar_reddy14
Active Contributor
0 Kudos

This is the simple Java program i have written in eclipse,convert this one in to UDF.

public class A {

public static void main(String args[])

{

String LCode = "a";

String Dev="rajasekhar";

//String c = Dev.substring(0,3);

//System.out.println(c);

if (LCode.matches("[a-zA-z]*"))

{

String Out = LCode+Dev.substring(0,3);

System.out.println("Alphanumeric"+Out);

}

else {

System.out.println("Not alphanumeric");

}

}

}

Regards,

Raj

Former Member
0 Kudos

Hi Raj,

I wrote the code as you instructed bellow and i am getting the Suppressed values when i check the Display Queue in message mapping.

public String LCode(String LCode,String DevNo,Container container){

//write your code here

if (LCode.matches("a-zA-z*"))

{

String Out = LCode+DevNo.substring(8,10);

return Out;

}

else

{

return LCode;

}

}

Here is my Mapping screen

http://img260.imageshack.us/img260/7000/mapp1.jpg

Please help me

Regards

Former Member
0 Kudos

Hi,

I will summarize this once again here

i have two input values

1) Receiving code

2) Delivery No

here i have to check if the receiving code contains only Alpha, then i have to concatenate Receiving location code with last 3 digits of Delivery No

For EX:

if the Receiving code is --ABCD

then i have to do the above mentioned one

if receiving code is AB123

i have to pass it as it is

if the receiving code is 12345

i have to pass it as it is

so by this wat i can say is if it the incoming field contains all alpha then only i have to do concatenation with last 3 digits of delivery No

else i have to pass the coming value as it is

REgards