0

I have a picklist custom field, let's call it Class__c of Unit custom object. I want to assign a default value to it. Default value is current user's Unit__c value. User's unit is also a picklist field. So in Class__c field I'm using TEXT($User.Unit__c) but I'm getting this error:

Error: Incorrect parameter type for TEXT. Expected Number, Date, DateTime, received Picklist

But we know that

TEXT converts picklist values to text in formula fields

I'm just confused why is that happening and what can I do in this situation?

1

1 Answer 1

1

as mentioned below the formula editor box:

Use formula syntax: Enclose text and picklist value API names in double quotes : ("the_text").

enter image description here

You can use this in your formula box.
"$User.Unit__c"

Hope it helps :)

2
  • thank you for your answer. But actually, this is not what I meant. Actually I got the answer here: salesforce.stackexchange.com/questions/389886/… Commented Jun 30, 2023 at 14:30
  • You are welcome :), but doesn't this answer your question that you posted here? You asked, why using the TEXT($User.Unit__c) is giving you the error and a fix for that right?
    – prem22
    Commented Jun 30, 2023 at 14:39

You must log in to answer this question.

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