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
emericaemerica 

Recreate Opportunity Stages field Picklist

Does anyone know if it's possible to recreate the Opportunity Stages picklist?

What I'd like to do is based upon a users choice from a picklist, populate another field with a percentage. Exactly how the Opportunity Stages picklist works, but with my own custom names and percentage values.

I really appreciate any insight or guidance anyone can provide.

Thanks!
ibarrieibarrie
You should be able to do it by creating a formula field with percentage as a return type.  You would then enter an advanced formula like this:
 
IF( ISPICKVAL( mypicklist__c, "Option 1" ), 25/100, IF( ISPICKVAL( mypicklist__c, "Option 2"), 50/100, IF( ISPICKVAL( mypicklist__c, "Option 3"), 100/100, null)))
 
With the above formula, you would get the following values:
25% if Option 1 is selected
50% if Option 2 is selected
100% if Option 3 is selected
 
You can just keep adding nested if statements for all of your picklist values, although if you have a lot it might get a little clunky.
 
It's very possible that there is a much better way to do this.  This is just what I came up with off the top of my head.
 
Good luck!
emericaemerica
Thanks so much for your reply.

I actually ended up doing it using the case function. Although I'm not sure if it's really the best way.

I basically used this, where name is the name of the partner and the deicmal is the precentage.

CASE( Partner__c ,
"NAME", 0.5,
"NAME", 0.3,
"NAME", 0.6,
0)
HerosHeros
Another way you  could have done this is with a Picklist for the percentages.  You would then create a feild dependency between the two picklists and make it so that the field is required and that you only have one Percentage avalible for each stage. 

I figured I would add this even though you figured out a way to do it for future people who read this and who do not know formulas too well.

:D