+ Start a Discussion
kenzokenzo 

Verify Picklist Not "Blank" (Empty / --None--)

Found the below on previous posts, but it's not working. Too newb to know why. Any help greatly appreciated.

 

AND(ISPICKVAL( Aircraft_Model__c ,""))

 

I've tried the above [as is and without the "AND" and extra ()] trying to verify that the user selects any item from the picklist for the custom object "Aircraft_Model__c" -- and if they don't make a selection then to refuse the record submission and spawn an Error Msg. 

 

I have the Validation Rule marked as Active and have an Error Message set in the appropriate field. However, the form still allows the end user to leave the field "blank" (system default) and submit the record.

SteveMo__cSteveMo__c

If you're just trying to make the Picklist a required field, all you need is this

 

 

ISPICKVAL(PickList_Fieldname__c, "")

 

 so for you it would be

 

ISPICKVAL( Aircraft_Model__c ,"")

 

 

 ***  In your post you referred to it as "custom object Aircraft_Model__c" is it a Picklist Field or a Lookup to a Custom Object?  If it's a Lookup(Custom Object) then ISPICKVAL won't work for you, you'll need to go with a LEN < 1 

 

Message Edited by Stevemo on 02-08-2010 05:35 PM
kenzokenzo

Stevemo:  sorry for the mis-label -- I have created a custom object and one of the fields is the Picklist described above. So, correct me if I'm wrong, but as such I believe I should use your suggested code.

 

However, when I tried using that code it still allows the record to be submitted -- no error message displayed. 

 

FYI, for a few of the TEXT fields (e.g. Serial #) I went in and marked them as "Required" -- and the system WILL refuse to accept the record and will post an Error Msg indicating their need for data.

 

Thanks for your time and help.

SteveMo__cSteveMo__c

Can you post the exact formula that you are using so that I can take a look at it?  (using the Code Clipboard)

 

Can you verify that you are using the correct API Field Name in your formula?

 

Also verify that the Validation Formula has been turned on by checking the Active [x] checkbox

 

 

kenzokenzo

Rule Name Model Active Checked Error Condition Formula ISPICKVAL( Aircraft_Model__c ,"") Error Message Please select your aircraft model. Error Location Aircraft Model Description Requires customer select a model of aircraft.

 

Rule NameModelActiveChecked
Error Condition FormulaISPICKVAL( Aircraft_Model__c ,"")
Error MessagePlease select your aircraft model.Error LocationAircraft Model
DescriptionRequires customer select a model of aircraft.

Steve:  I hope the above is what you are refering to as "exact formula" - i.e. the ISPICKVAL, etc.  I assume API Field Name is Aircraft_Model__c -- if so, that is the correct name.  And, as above, the Validation Formula is checked as Active. Thx.
John SchroederJohn Schroeder
Steve Molis, your first answer in this thread about making a picklist required helped me solve an issue where employees were entering sold dates, but not changing the job status.  Thank you!
AND( 
ISCHANGED( Date_Sold__c ), 
(ISPICKVAL( Status__c, "")))