function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Divya V 11Divya V 11 

vlidation rule explain please someone

Hello All, 
 I just need some help in implementing this by using validation rules ., there are five picklist values with  field names Master, Picklist A,Picklist B,Picklist C,Picklist D containing the values "Alpha", "Beta" and "Charlie" in all five ... 
if the Master field value is changed from "Alpha" to "Beta" ...picklist A and picklist B should be made mandatory..........
 
 
 
Best Answer chosen by Divya V 11
Ajay K DubediAjay K Dubedi
Hi,
Please try the following:-
AND(
   ISPICKVAL(PRIORVALUE( Master ), "Alpha"),
  ISPICKVAL(Master , "Beta"),
 OR(
 TEXT(  picklist A) ='',
TEXT(  picklist B) =''
)
)

 

All Answers

Ajay K DubediAjay K Dubedi
Hi,
Please try the following:-
AND(
   ISPICKVAL(PRIORVALUE( Master ), "Alpha"),
  ISPICKVAL(Master , "Beta"),
 TEXT(  picklist A) ='',
TEXT(  picklist B) =''
)
Kindly mark as best if found helpful.

Thanks
Ajay​
Divya V 11Divya V 11
hello,

Thanks for your reply but it dint work , both picklist A and B should be made mandatory but it just takes any one mandatory . could you please help.

thanks...
Ajay K DubediAjay K Dubedi
Hi,
Please try the following:-
AND(
   ISPICKVAL(PRIORVALUE( Master ), "Alpha"),
  ISPICKVAL(Master , "Beta"),
 OR(
 TEXT(  picklist A) ='',
TEXT(  picklist B) =''
)
)

 
This was selected as the best answer
Divya V 11Divya V 11
nope its not working its just accepting beta value without making any field mandatory..any other suggesstions?
Amit Chaudhary 8Amit Chaudhary 8
Below code should work
AND(
		ISPICKVAL(PRIORVALUE( Master ), "Alpha"),
		ISPICKVAL(Master , "Beta"),
		
		OR(
			TEXT(  picklist A) ='',
			TEXT(  picklist B) =''
		)
)
NOTE:- Please set Master as "Alpha" the update the same as "Beta".
 
Divya V 11Divya V 11
thanks all so much it did work :)