You need to sign in to do that
Don't have an account?
Srini
Help_Validation rule
Hi Team,
Can any one please help me to create a Validationrule for below senario.
Thanks in Advance
Can any one please help me to create a Validationrule for below senario.
Is this approved | Request # | Approval Status |
<Blank> | <Blank> | Not Submitted |
<Blank> | <Completed> | Submitted for Approval |
Yes | <Completed> | Approved |
Yes | <Blank> | Not Submitted |
No | <Completed> | Rejected |
No | <Blank> | Not Submitted |
Thanks in Advance
Correct me if i am wrong,
Is_this_approved__c field is Checck box,
Request__c field is Text field
Approval_Status__c is picklist,
if its not, let me know the field name with dataType
Thanks
karthik
Please check below Datatypes:
Is_this_approved__c = Picklist(Yes,No)
Request__c = Text
Approval_Status__c = Picklist(Not Submitted,Submitted for Approval,Approved,Rejected)
Thanks
Use below code in validation rule,
Hope this will help you,
Mark Best ANSWER if its work for you..
Thanks
karthik
Thanks for your helping to me..I have one doubt hear Request__c field Data type is "Text field" .After filling the one request form one number is genrated like "RN-123456" that number we needs to be enetred in the Request__c field. In validation rule how we can mention instead of Request__c='Completed' to Request__c='RN-123456' .Can you please help me on this.
Thanks
Yes it will accept, use below code, for your change,
Hope this will help
Thanks
karthik
Request field is always not same it will be changing .We have tried below validatione rule.But not working.Please have a look on this issue.
AND
(IF(ISPICKVAL(Is_this_approved__c ,'--None--') && Request__c ='' && ISPICKVAL(Approval_Status__c ,'Not Submitted'),False,True),
IF(ISPICKVAL(Is_this_approved__c,'--None--') && Request__c <>'' && ISPICKVAL(Approval_Status__c,'Submitted for Approval'),False,True),
IF(ISPICKVAL(Is_this_approved__c,'Yes') && Request__c <>'' && ISPICKVAL(Approval_Status__c,'Approved'),False,True),
IF(ISPICKVAL(Is_this_approved__c,'Yes') && Request__c ='' && ISPICKVAL(Approval_Status__c,'Not Submitted'),False,True),
IF(ISPICKVAL(Is_this_approved__c,'No') && Request__c <>'' && ISPICKVAL(Approval_Status__c,'Rejected'),False,True),
IF(ISPICKVAL(Is_this_approved__c,'No') && Request__c ='' && ISPICKVAL(Approval_Status__c,'Not Submitted'),False,True))
Thanks
use this below code.. i checked in my org it will work 100%
Hope this will help you,
Mark Best ANSWER if its helps you.
Thanks
karthik
Sorry for the late response..logic is not working me.Is there any possibilty to do through workflows? if yes can you please tell me how to do.
Thanks
Srini
Sorry, really i dont know what you want to do. you want a raise a validation error messgae to prevent save record or you want to field update based on the those 2 fields value?
if you want to prevent record saving with validation you have to use validation rule. in this case my last updated validation rule works perfectly.
OR
if you want to update Approval Status field based on those 2 fields. you should have to use workflow rule with field update or process builder
make things clear so that you can stick with one way.
Thanks
karthik
Actually we are trying to
1.If Is this approved Field(Picklist) "Blank means None" , Nuclear Risk SC Request # field(every time it is not same number or trext) is "Empty(No value)" then Approval Status(Picklist) should be NotSubmitted.
2.If Is this approved Field, Request field is "RC-01234" then Approval Status should be Submitted for Approval.
3.If Is this approved Field "Yes" , Request field is "RC-01235" then Approval Status should be Approved.
4.If Is this approved Field "Yes" , Request field is "Empty" then Approval Status should be Not Submitted.
5.If Is this approved Field "No" , Request field is "RC-01236" then Approval Status should be Rejected.
6.If Is this approved Field "No" , Request field is "Empty" then Approval Status should be Not Submitted.
Let say If i select "IsthisApproved" = Yes, Request = some data (RC-01234) then Approval Status should be Approved. so hear we are updating the Approval Status field based on the IsthisApproved and Request fields.similorly other points as well..
I hope whatever we have done so far logic is good.But that logic is not working me.Can you please help me to create workflow rules on this.
Thanks