on 07-25-2014 3:58 PM
Hi Expert,
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)
Regards
Faisal.
Hi Faisal,
why you need the UDF for this req. You can achieve this using standard function.
A --> startwith FX(text function) -->
B --> startwith WOOT (text function) -->AND --->> IF without else --> map constant 317914431 to target
B --> startwith ZDS(text function) -->AND
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Faisal,
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))
{
return res;
}
regards,
Harish
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.