1

I'm trying to create a custom case formula field so I can create a view that allows someone to view all cases where the case owner belongs to a certain site as defined on their user object in the picklist value "Work_Site__c":

Owner:User.Work_Site__c

I am receiving the following error:

Error: Field Work_Site__c is a picklist field. Picklist fields are only supported in certain functions.

Are picklists not accessible through formulas or are they not accesible through cross-object formulas?

Any recommended workarounds?

  • Picklist are accessible in formula. Have you gone through the documentation around using picklist in formula? A good starting point is trailhead -- trailhead.salesforce.com/en/modules/advanced_formulas/units/… – Jayant Das Apr 20 '18 at 16:38
  • 1
    Have you tried the usual trick, wrapping it in TEXT(), ie, TEXT(Owner:User.Work_Site__c)? – battery.cord Apr 20 '18 at 16:47
  • @battery.cord Perfect! If you want to repost this comment as an answer I will mark it as correct. Do you know why though? I'm assuming this has to do with the type? Like a picklist value is of value type and not a text type? – S.B. Apr 20 '18 at 17:34
  • Basically, yeah. You have a formula with a TEXT output type, so you can't use a Picklist output, so you need to convert it to the right format. – battery.cord Apr 20 '18 at 17:38
2

Wrap your picklist value in a TEXT() function.

From the documentation:

Converts a percent, number, date, date/time, or currency type field into text anywhere formulas are used. Also, converts picklist values to text in approval rules, approval step rules, workflow rules, escalation rules, assignment rules, auto-response rules, validation rules, formula fields, field updates, and custom buttons and links.

Your end formula will look like this:

TEXT(Owner:User.Work_Site__c)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.