Hi All,
How to apply validation for below rules?
Table Data:
EMPNO | DEPTNO | P1 | P2 | P31 | P32 | P41 | P42 | P51 | P52 | P6 | P7 | P81 | P82 | P9 |
1001 | 10 | Y | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
1002 | 20 | N | Y/N | |||||||||||
1003 | 30 | Y | Y/N | |||||||||||
1004 | 10 | N | _ | |||||||||||
1005 | 20 | Y | Y/N | |||||||||||
1006 | 30 | N | _ | |||||||||||
1007 | 10 | Y | Y/N | |||||||||||
1008 | 20 | N | _ | |||||||||||
1009 | 30 | Y/N | ||||||||||||
1010 | 30 | Y/N | ||||||||||||
1011 | 10 | Y | Y/N | |||||||||||
1012 | 20 | N | ||||||||||||
1013 | 30 | Y/N |
Validation rules are the following:
Any record fails meeting validation rules will flag as error.
1.P1 is either Y or N
2.If P1 is Y ==> remaining all are empty as shown in screen.
3.If P1 is N ==> P2,P31,P41,P51,P6,P7,P81,P9 are needed.
4.If P31 is N ==> P32 should be empty.
5.If P31 is Y ==> P32 either Y or N.
6.If P41 is N ==> P42 must be empty.
7.If P41 is Y ==> P42 either Y or N.
8.If P51 is N ==> then P52 must be empty
9.If P51 is Y ==> then P52 either Y or N.
10.If P81 is N ==> then P82 must be empty
11.If P81 is Y ==> then P82 either Y or N.
How to write validation?
Thanks in advance.