Today I ran in to a scenario where I needed the status field for projects to hide a value for everyone except two specific roles. I did some googling and found a post which seemed to theoretically accomplish what I was looking for. However, in practice it didn’t. That said, I won’t be covering what didn’t work as nobody really cares.
Now down to business. The first thing we need to do is edit the vardefs of the drop down to use a custom function that will handle the logic of determining if the specified value is available for selection.
Next, create the file and function to handle the logic.
Finally, run Quick Repair and Rebuild. The drop down is now hiding the “Pending Input” option for everyone except users in the Developer and Marketing roles.