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
justajaynejustajayne 

ispickval function - error received

I am trying the use the following validation rule, but I keep receiving an error message:
 

AND(ISPICKVAL( Subject ,"Call"),LEN( Call_End_Time__c )=0)

 

The error I am receiving states the following:

Error: Incorrect parameter for function ISPICKVAL(). Expected Picklist, received Text

 

 

The field Subject is a picklist and when "Call" is chosen I would like to be sure a value for Call End time is entered. It woud be greatly appreciated if someone could assist me :)

glowitzglowitz
I think you're missing a right parenthesis after the word "Call"

Try:

AND(ISPICKVAL( Subject ,"Call"), LEN( Call_End_Time__c )=0)

Also, the field type for Subject must be a picklist (not a multi-select picklist) -- it may be that this is a text field. In addition, the value for Call_End_Time__c must be a text string, not a number. If this field is a number, the LEN command does not work and will return an error. If you verify these rules, you'll get zero errors with the syntax checker. I tried it to confirm no errors.



Message Edited by glowitz on 05-21-2008 09:35 PM
MyGodItsColdMyGodItsCold
Multi-select (multiselect) picklist restriction is an important one. If you really have to use a multi-select, in a formula, there is a workaround that is complicated to explain, but easy to do - let me know if you want the (gory) details.
JakesterJakester
Ok, I'll bite-

What easy workaround do you have?
mfarbodmfarbod
Did you find out the work around for the mulit-pick?
MyGodItsColdMyGodItsCold

You need to set up a new object. In that object, you need to have a field uwhich mirrors the multi select picklist (msp). You then need a 'type' field which will reference a name for the msp. Finally, you need some kind of way to reveal the contents - e.g. a text fielld, or checkboxes.

 

Say you're doing a msp you name RGB (red, green, blue). You might have 3 checkboxes, or a text field named contents__c.

You'd then make entries showing all the entries possible (or of interest - we have a field w/ many possibilities, but are only interested in knowing when it takes on one particular value).
 
Then, when you want to know the contents of the RGB__c field, you'd SELECT from this object where TYPE__c = 'RGB'. Then, you'd loop thru, looking for equality, and when you get it, you'dse look at your checkboxes (or text field) to see what you've got.
 
Because the choices are always ordered in the way they're listed, you don't need to do all the permutations, just combinations.
 
A msp with 10 choices means 1,024 enteries to cover the possibilities. You'd want to write a small program to generate the CSV input file for Data Loadeer.
 
The key point is that you can test 1 msp value with another for equality, but you need other means of knowing contents.
 
I hope this is clear, let me know if you'd like more detail.
JakesterJakester
good grief. I'd hate to see what you call hard, if that's what you call easy.
MyGodItsColdMyGodItsCold

Hard is:

Knowing you are about to exceed governor limits, recording that fact in a custom object, and having other pages do the work so as not to degrade the user experience;

Creating a 3 dimensional virtual reality representation of data that runs fast and lets users 'fly' around looking for 'interesting' patterns;

Letting a user control that experience with a headband that reads neural activity (look for Neural Impulse Actuator on Amazon.com);

Communicating / illustrating all this so it looks (and is) not so hard.

 

I'm thinking of doing a U-Tube video & doing an underground presentation at Dreamforce. What do you think?