UDF for checking 3 values
Can anybody help me out for creating an UDF for below requirements?A,B and C are input field and based upon the below condition the output for D will be decided.
if A starts with FX and B starts WOOT and C = ZDS
then D=317914431 (or any other value)
Harish Mistri replied
It is better to maintain the values set in table rather then in UDF. In UDF you need to hardcode the values. but you can check the below code if it suits your req.
Input paramter = A, B, C.
|String res = "res";|
String Apre = "FX";
String Bpre = "WOOT";
String Cpre = "ZDS";
if(A.startsWith(Apre) && B.startsWith(Bpre) && C.startsWith(Cpre))