cancel
Showing results for 
Search instead for 
Did you mean: 

User defined function Problem

Former Member
0 Kudos

if (a.equals= = 311&&b.equals == SL02&&c.equals==SL01))

return "SL04";

elseif(a.equals= = 311&&b.equals == SL01&&c.equals==SL11))

return "SL01";

Problem in this UDF

Regards

Skancham

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member193376
Active Contributor
0 Kudos

why are you using UDF. You should use a UDF only if its not possible with Graphical node functions. Your conditions can easily be achieved without an UDF. Check the node functions and do it.

Thanks

S

Former Member
0 Kudos

Hi,

Check this code or you can directly use the predefined AND and EQUALS functions.

if (a.equals("311") && b.equals("SL02") && c.equals("SL01"))

return "SL04";

elseif(a.equals("311") && b.equals("SL01") && c.equals("SL11"))

return "SL01";

Regards

Ramesh

jyothi_anagani
Active Contributor
0 Kudos

Hi,

Your UDF code syntax is totally wrong. you are using the equals method and using the == also. It should not be like that.

Please modify the code as shown.

if (a.equals("311")&&b.equals("SL02")&&c.equals("SL01"))
return "SL04";
elseif(a.equals("311")&&b.equals("SL01")&&c.equals("SL11"))
return "SL01";

Thanks.

rajasekhar_reddy14
Active Contributor
0 Kudos

you dont need UDF at all,use equals function(TEXT) and "AND" function,it will work.

Regards,

Raj