2

In reference to a previous question that was asked (Formula based on picklist), I am trying to create an Activity Custom Formula Field that returns a text value if the field value in Contracts object is equal to "Alaska". Otherwise, it returns "Not Alaska". However, this is not working. Although the Country in Contracts is Alaska, it returns "Not Alaska" in my formula field. What is missing?

Formula: IF(ISPICKVAL(Contract__r.Country_of_Operation__c , "Alaska"),"Alaska","Not Alaska")

enter image description here

enter image description here

5
  • Hmm.. Well, I have just created a Country_Of_Operation field and a Contract lookup on Activity in my Dev Edition, and when I paste your formula in, I get Alaska or Not Alaska exactly as expected.. are you sure you don't have a spelling mistake in your picklist? and are you modifying/refreshing the right records? definitely works for me! Commented Jan 21, 2016 at 16:40
  • Hi Simon, Thank you for your response. I have provided further snapshots of how this is set up, though not working. The 'Country of Operation' field is on the Contract object. The 'Country Contract' is the custom formula field on Activity object. As an example for one of our contract records, the value shows 'Alaska' on the Country of Operation field. When I create a new Activity History entry and Save, the formula field (Country Contract) states 'Not Alaska' when it should display 'Alaska'. Do you know why that would show this value?
    – Nancy N
    Commented Jan 21, 2016 at 17:26
  • Very strange. I have tried a number of things to break my test! It's not case sensitive (ISPICKVAL) and if you try to put any other field type in there it just refuses the formula... I have tried all sorts of orders-of-creating the Contract and Activity. Are you sure the reference in the lookup for Contract__r is correct? What are the other options in the Picklist for Country_Of_Operation (I just created one other called "Other" on mine) Commented Jan 21, 2016 at 17:42
  • Have you been always responsible for this work as well? I would not "assume" in a mature Salesforce org that the field label you are looking at on the page is an indicator of the actual field API name (used in the formula!) so double check the __c bits relate to the correct data! Commented Jan 21, 2016 at 17:45
  • The above IF statement did not work for me. Instead, I created another solution where I created an Activity Custom Field formula of checkbox boolean type and then used the ISPICKVAL() logic, then referenced this field in my workflow! That worked!!!
    – Nancy N
    Commented Jan 21, 2016 at 21:12

0

You must log in to answer this question.

Browse other questions tagged .