ShowAll Questionssorted byDate Posted
Barbara Arthur

# Error: Field Touch_Frequency_PW__c may not be used in this type of formula

I get an error message:  Error: Field Touch_Frequency_PW__c may not be used in this type of formula.  Touch Frequency is a Picklist Field and Last Review is a date field.  Any suggestions/corrections for the following formula calculation?

IF (ISPICKVAL(Touch_Frequency_PW__c  , "Annual"),  Last_Review_PW__c   + 365,
IF (ISPICKVAL(Touch_Frequency_PW__c , "Semi-Annual"), Last_Review_PW__c  + 180,
IF (ISPICKVAL(Touch_Frequency_PW__c , "Quarterly"), Last_Review_PW__c  + 90, Last_Review_PW__c
)
)

)

thank you for your help!
Barbara
Best Answer chosen by Barbara Arthur
Taha Syed
Or just start from the beginning.. Create a custom field of type "Formula"
Select return type as "Date"
Then enter this formula..
It should work.

Taha Syed
May I know if this is a formula field of data type Date that you are trying to populate

Barbara Arthur
Hello Taha,
Yes, the field I am trying to populate is a Date field.
Sunil Sarilla
Hi Barbara,
What is the data tupe of Touch Frequency PW field?
Barbara Arthur
Hi Sunil,
The Touch Frequency field is a picklist with only those three values (Quarterly, Semi-annual, Annual)
Sunil Sarilla
Where and how are you using this formula, i.e. field update formula, direct formula field?
Taha Syed
Just recreated the same on a formula field (return type date) on opportunity.. works perfectly with no syntax errors..

```IF ( ISPICKVAL(StageName , "Annual"),
Billing_Date__c + 365,
IF ( ISPICKVAL(StageName, "Semi-Annual"),
Billing_Date__c + 180,
IF (ISPICKVAL(StageName, "Quarterly"),
Billing_Date__c + 90,
Billing_Date__c
)
)
)```

I think you should check the data types of your fields.
StageName is Picklist
Billing_Date__c is Date field

Barbara Arthur
I am trying to insert the formula directly on the custom field created in the CONTACTS object, which may be causing the problem.  The formula field has a drop down called "Select Field Type" but doesn't seem to give an option for the CONTACT object.

Barbara Arthur
Barbara Arthur
Oh my goodness......just finally understood your question.  I chose DATE as the field type instead of Formula as the field type when initially creating the calculated Field.   Thank you so much for helping me see the light!!!!  :-)
Taha Syed
In that dropown you have to select date. Thats the forumla return type.

Taha Syed
Or just start from the beginning.. Create a custom field of type "Formula"
Select return type as "Date"
Then enter this formula..
It should work.
This was selected as the best answer
Taha Syed
That solves our problem =)
Barbara Arthur
Thank you for your help!