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?

4
  • 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
    Commented Apr 20, 2018 at 16:38
  • 1
    Have you tried the usual trick, wrapping it in TEXT(), ie, TEXT(Owner:User.Work_Site__c)? Commented Apr 20, 2018 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.
    Commented Apr 20, 2018 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. Commented Apr 20, 2018 at 17:38

1 Answer 1

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)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .