cancel
Showing results for 
Search instead for 
Did you mean: 

UDF Required for checking input value.

Former Member
0 Kudos

Hi,

I'm in need of an UDF for checking the input value and pass constant based on that.

Requirement.

We are having 1 field on the source side which need to be checked.

If the first character of the input is alphabet (No case sensitive)

then pass a constant "X" to the output field.

Other wise donot create that particular element.

Example : If INPUT = A12345 then OUTPUT = X

If INPUT = 12345D then OUTPUT element must not be created.

Regards,

Swapna

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

use the following code in a udf and then pass the result to createIf standard function to help you with the requirement.

String chkValue = input.subString(0,1);
String flag = "false";
if ((chkValue >= 'A' && chkValue <= 'Z') || (chkValue >= 'a' && chkValue <= 'z')) {
flag = "true";
                      return flag;
                    }
else
{return flag;}

Answers (1)

Answers (1)

SudhirT
Active Contributor
0 Kudos

Hi,

Write UDF and check the condition for alphabates like

if (a<i>< 125 && a<i> >75)

check the ascii values of alphabates.

THANKS!