+ Start a Discussion

Checking if any picklist value has been selected.


we have a checkbox named 'On Behalf Of', which when checked should have a value in the picklist named 'On Behaf of user'.

I already have a field dependency set to show the picklist values only when the checkbox is checked, but we need to make sure that the user selects something in the picklist ( and not just leave it as --None--).

The validation rule I was using is:

AND(On_Behalf_of__c , IF(  ISPICKVAL( On_Behalf_of_User__c, "none") , FALSE, TRUE)).


But this prevents the users from saving the data, even when they have a valid value in the picklist. I think the problem is the "none" part in the picklist, so how should one check to see if the picklist has a value other than --None--.


I first thought try checking for null rather than none to see if the actual value is really null not none. 
You want your validation rule to trigger when the formula evaluates to TRUE.  
Try this: 
      ISPICKVAL(On_Behalf_of_User__c, "")
Thanks for the suggestion, but I had already tried it, didnt work ...


Wow,  I tested a validation rule for a picklist to make sure the record can not be saved unless there is a value from the pick list entered and it works. The rule formula being just the following:

          ISPICKVAL( Test_Values__c , "")

and it works for me. 
Maybe something else is needed with a dependent picklist?
It is important to have ""  for the null not " "
Thanks NPM, the problem was with the false, and true in the IF statement. the order should have been reversed, and the "" worked.

Thanks a bunch for the help.