You need to sign in to do that
Don't have an account?
icemft1976
validation formula for an empty picklist
I figured this would have been answered by doing a forum search but no luck:
How do I make a picklist field 'required' with a validation rule?
I tried using both ISPICKVAL and CASE to detemrine when a picklist had not value selected, but either I get "invalid argument" (case) or no match (ISPICKVAL).
CASE example:
IF( AND(Extension_Date__c <> null, CASE(Extension_Reason__c, "Budget", false, "Org Change", false, true) ) , true, false)
ISPICKVAL example:
IF( AND(Extension_Date__c <> null, ISPICKVAL(Extension_Reason__c, "" ***) ), true, false)
***[ also tried NULL, "NONE",etc]
Can this only be done using a NOT check on every picklist value? Seems cumbersome.... i.e.
IF AND(Extension_Date__c <> null, NOT(ISPICKVAL(Extension_Reason__c, "Budget")), NOT(ISPICKVAL(Extension_Reason__c, "Org Change")) ), true, false)
Thanks,
ajd
How do I make a picklist field 'required' with a validation rule?
I tried using both ISPICKVAL and CASE to detemrine when a picklist had not value selected, but either I get "invalid argument" (case) or no match (ISPICKVAL).
CASE example:
IF( AND(Extension_Date__c <> null, CASE(Extension_Reason__c, "Budget", false, "Org Change", false, true) ) , true, false)
ISPICKVAL example:
IF( AND(Extension_Date__c <> null, ISPICKVAL(Extension_Reason__c, "" ***) ), true, false)
***[ also tried NULL, "NONE",etc]
Can this only be done using a NOT check on every picklist value? Seems cumbersome.... i.e.
IF AND(Extension_Date__c <> null, NOT(ISPICKVAL(Extension_Reason__c, "Budget")), NOT(ISPICKVAL(Extension_Reason__c, "Org Change")) ), true, false)
Thanks,
ajd
ISPICKVAL can now detect a null picklist value (i.e., "None Selected")
http://forums.sforce.com/sforce/board/message?board.id=discuss&message.id=1906
I think what you're actually getting at is:
AND(Extension_Date__c <> null, ISPICKVAL(Extension_Reason__c,""))
This will return true if the extension date is specified but nothing is specified in Extension Reason (or if something is in Extension Reason and nothing is in Extension Date). No IF required.
the IF statement you see applied to a couple other conditions in the validation rule, but it is extraneous in the context of this discussion - sorry about that.
So I tried your formula (that's actually the first thing I tried) and no luck. Have you ever been able to actually make a null picklist check work in your SF instance? I can't make this any simpler, i just have
AND(Extension_Date__c <> null, ISPICKVAL(Extension_Reason__c,""))
but I must be missing something because it doesn't throw an error when a I edit a contract, add an extension date but leave the reason blank.
Frustrating....
Whne I changed the Date check from "Extension_Date__c <> null" to "NOT ( ISNULL ( Extension_Date__c ) )" everything worked fine. Weird.
Thank again!
ISBLANK(TEXT( Picklist field ))
I hope will work
ISBLANK(TEXT( Picklist field )) works absolutly fine.
My Validation rule is not catching when my Picklist field is blank.
I'm following the above suggestion - ISBLANK (TEXT (picklistfield__c)
It saves the record with Record Type, Checkbox and Date, but Picklist field is blank
What am I doing wrong here?
Here's the rule:
AND(
RecordType.Name = "AFC",
Inactive_Consumer__c,
ISBLANK( TEXT( Reason_Deactivated__c )),
ISBLANK( Inactive_Effective_Date__c)
)
Frustrating!!
Thanks
Try this instead:
AND(
RecordType.Name = "AFC",
Inactive_Consumer__c = TRUE,
ISBLANK( TEXT( Reason_Deactivated__c )),
ISBLANK( Inactive_Effective_Date__c)
)
Make it a great one,
Wade 'Smokey' Lovell