function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion


Hello i know this is very simple but i am bangging my head....please advise..


We have a field called Category which is of type Text. Now the type is changed to picklist.


I have an s-Control where i used to grab the Category value.


var cate = "{!$User.Category__c}";


Now that the field type is changed i am getting the following error

Error: Field Category__c is a picklist field. Use it with an ISPICKVAL() or CASE() function instead.
i have searched discussion boards.....but did not find the solution....please help... Thanks in advance
Are you sure this error is in an Scontrol and not in a formula field?

yes. I am pretty sure.

Again i double checked. The error is showing in scontrol

Maybe you have a Validation Rule on Category that needs to be changed?
Yes, that error is not a Javascript error, it's a formula error -- something's fishy there.