# UDF assistance

Hi All need assistance in a UDF ....

I need assistance in cracking this logic via UDF

element TEST can have values a,b,c,d.........q , now the logic is

if TEST = a or b or c or d....... or q , then send a send a constant to target field TARGET.

TEST~~-UDF(checking for a OR b OR c OR... OR q)~~~~- if -~~

then---CONSTANT = TARGET.

Thanks

Kiran

##### Shabarish Vijayakumar replied

Hi All need assistance in a UDF ....

>

> I need assistance in cracking this logic via UDF

>

>

> element TEST can have values a,b,c,d.........q , now the logic is

>

> if TEST = a or b or c or d....... or q , then send a send a constant to target field TARGET.

>

> TEST

~~-UDF(checking for a OR b OR c OR... OR q)~~~~- if -~~

then---CONSTANT = TARGET.>

> Thanks

> Kiran

assuming your input is 'in' then

String constant = "ABCD"; if(in.equals("a") || in.equals("b") || ...... in.equals("x")) { return constant; }