I know it is possible to dataload a text value that "happens" to match a particular picklist value into the picklist field. The field looks no different than if you actually selected the value via the ui. Somehow this feels wrong to me though. Is this a legitimate practice? BTW, if this is legit, I would be doing it from a flow.
1 Answer
Yes, picklist fields take text input - you can also do this in Apex code. Multi-picklist fields also store their values as text, semi-colon seperated.
It's only when you retrieve the value in a calculation that you have to apply a TEXT() or a ISPICKVAL() or INCLUDES() calculation.
In code, assigning values to these types looks like this:
Picklist_Field__c = 'Value1';
Multi_Picklist_Field__c = 'Value1;Value3';
-
2Worth noting that the assignment uses the values API name(s) rather than labels.– Phil WMar 31, 2021 at 21:11