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
miss vmiss v 

ISPICKVAL in a Cross Object not working

I've use the ISPICKVAL function a million times, but I can't get it to work on the most simple formula - using a cross object.
Basically, I just want the formula to display 1 if the Benefit Year is 2008 (text string), and 0 if anything else.
Any ideas?

IF(ISPICKVAL(Benefit__r.Benefit_Year__c, "2008"), 1,0)

Force2b_MikeForce2b_Mike

I'm having a similar issue. Should work, but it's not.

 

I have a formula on an Opportunity that is supposed to pull the value from the related Account. Tried both Case() and If(). Both of the below blocks return blanks. I've confirmed that the picklist value on the Account is in the list.

 

 

CASE(Account.Number_of_Assets__c, "Less than 1000", "Less than 1000", "1000 - 5000", "1000 - 5000", "5001 - 10,000", "5001 - 10,000", "10,001 - 100,000", "10,001 - 100,000", "More than 100,000", "More than 100,000", "") IF (ISPICKVAL( Account.Number_of_Assets__c, "Less than 1000"), "Less than 1000", IF (ISPICKVAL( Account.Number_of_Assets__c , "1000 - 5000"), "1000 - 5000", IF (ISPICKVAL( Account.Number_of_Assets__c, "5001 - 10,000"), "5001 - 10,000", IF (ISPICKVAL( Account.Number_of_Assets__c, "10,001 - 100,000"), "10,001 - 100,000", IF (ISPICKVAL( Account.Number_of_Assets__c, "More than 100,000"), "More than 100,000", "")))))

 

 

 

fredkafredka

Did either of you find a resolution for this ??? I am having the same issue... trying to get a picklist value from the opportunity to my custom object (which is below opportunity)

 

 Thanks!!

miss vmiss v
still waiting for someone to help figure this one out... :(
Force2b_MikeForce2b_Mike

I think that there was a combination of issues here. First off, something wasn't working right with the IsPickVal() return. But, even once that was working the real problem was that some of my picklist values were not exact matches.

 

For example, in the following code it requires that the picklist values exactly match the values in the CASE. 

 

CASE(Account.Number_of_Assets__c,

"Less than 1000", "Less than 1000",

"1000 - 5000", "1000 - 5000",

"5001 - 10,000", "5001 - 10,000",

"10,001 - 100,000", "10,001 - 100,000",

"More than 100,000", "More than 100,000",

"" )

 

If the field value is something different ("1000-5000" for example), then the above returns a blank because "1000-5000" is not exactly equal to "1000 - 5000". You're welcome to post your function code to look at. 

 

Mike 

HaigyHaigy

Hi Miss V, 

 

Your formula is correct but if you are using a text formula you need to make sure you put the numbers 1 and 0 in quotation marks for eg. IF(ISPICKVAL(Benifit_r.Benefit_Year__c, "2008"),"1","0")

 

If the Benefit Year field is not a pick-list you shouldn't be using ISPICKVAL. 

 

miss vmiss v
the field i'm trying to populate a value in is set as a formula- number value.