In this Salesforce Tutorial, we will learn the Salesforce Picklist Default Value Formula. In addition, we will also explore the step to set up the default picklist value using the formula in Salesforce Lightning and Salesforce Classic.
While working in an organization that uses the Salesforce CRM tool, I got a requirement to set up the picklist value based on specific conditions. So, for this, I define the picklist value formula.
If you want to learn how to define the Salesforce picklist formula in both Salesforce Lightning as well as Salesforce Classic components, you have come to the right place.
The following are the topics that we will cover in this salesforce tutorial:
- Salesforce Picklist Default Value Formula
- Picklist Default Value Formula in Salesforce Lightning
- Picklist Default Value Formula in Salesforce Classic
Salesforce Picklist Default Value Formula
Salesforce provides us the feature to set the default value of a picklist field using Salesforce formulas. This feature helps the user to set the default value dynamically based on certain conditions and logic specified in the formula.
In addition, it also saves the time and effort of the users. The automatic assignment of the default value also minimizes human interaction and errors in the value section process.
Moreover, setting up the picklist default value based on the formula improved the user experience. It also makes our Salesforce application easier to operate. Even data entry becomes more simple since users are given alternatives that are related to their situation.
With this, we have understood the Salesforce picklist default value formula with its benefits. Now, we will move ahead and learn the procedure to define the default picklist value formula in Salesforce Lightning.
Picklist Default Value Formula in Salesforce Lightning
Here, are the steps for the picklist default value formula in Salesforce Lightning:
Step 1: First, log in to Salesforce Lightning mode, for this navigate to the right corner of the page, click on the “Gear” icon, and from the dropdown menu select “Setup”.

Step 2: From the menu located on the left side, click on “Object Manager”.

Step 3: Search for the object for which you want to define the formula for the picklist default value. In this, I select the “Product” object.

Step 4: From the left side of the menu, click on the “Field & Relationship” option.
Step 5: Click on the “New” button to create a new picklist field.

Step 6: Now, choose the “Picklist” as the field type and then click on the “Next” button.
Step 7: Enter the “Field Label” and the “Field Name” will be automatically populated based on the label. Here, I enter the field label “Product Priority”.
Step 8: Click on the radio button next to “Enter values, with each value separated by a new line” located in the “Values” section, to enter the picklist values.
Step 9: Now, enter the picklist values, in the box that appeared. Here, I enter the picklist values “High”, “Medium”, and “Low”.
Step 10: Scroll downwards, and click on the “Show Formula Editor” option.
Step 11: Now, enter the formula expression in the text box. For creating the formula, we can use different functions, operators, fields, etc. Here, is the formula:
CASE( MONTH( TODAY()), 5, "High", 8, "Medium", "Low" )
- In this formula, we use the CASE() function to automatically assign a product priority based on the month.
- We use the MONTH(TODAY()) function to return the numeric value of the current month.
- Then, we assigned the product priority based on the below-given conditions:
- It checks, if the current month is 5 or May, the formula dynamically assigns the default value of the product priority to “High”.
- It checks, if the current month is 8 or August, the formula dynamically assigns the default value of the product priority to “Medium”.
- For other months, the formula dynamically assigns the default value of the product priority to “Low”.
Step 12: Click on the “Check Syntax” button, to verify the formula.
Step 13: To continue, click on “Next”.

Step 14: Select the suitable field-level security. Here, I want it to be set for all the profiles, so I clicked on the checkbox next to “Visible”.
Step 15: Click the “Next” button to continue.

Step 16: Choose the page layout on which we want to show the custom field.
Step 17: Click the “Save” button to finish the process of defining the formula for the picklist default value.

With this, we have successfully defined the formula for the picklist default value in Salesforce Lightning Component. Now, we will proceed and learn to define the formula for the picklist default value in Salesforce Classic Component.
Read How to Rearrange the Picklist Values in Salesforce
Picklist Default Value Formula in Salesforce Classic
Here, are the steps for the picklist default value formula in Salesforce Classic:
Step 1: First, we need to log in to Salesforce Classic. For this, click on “Avatar” and select “Switch to Salesforce Classic”.

Step 2: After that, click on the “Setup” option.

Step 3: Now, scroll down to the “Build” section. Then under “Customize”, select the object for whom we want to create a picklist field with the default value. Here, I choose the “Contract” object.
Step 4: Click on the “Fields” option to create a new field in the selected object.

Step 5: Now, scroll down to the page, and click on the “New” button located in the “Custom Fields & Relationships” section.

Step 6: Choose the field type as “Picklist” and click on the “Next” button.

Step 7: Enter the “Field Label” and the “Field Name” will be automatically populated. Here, I set the “Field Label” to “Contract Validation”.
Step 8: Click on the radio button next to “Enter values, with each value separated by a new line” located in the “Values” section, to enter the picklist values.
Step 9: Now, enter the picklist values, in the box that appeared. Here, I enter the picklist values “Signed” and “Unsigned”.
Step 10: Scroll downwards, and click on the “Show Formula Editor” option.
Step 11: Now, enter the formula expression in the text box. For creating the formula, we can use different functions, operators, fields, etc. Here, is the formula:
IF(
$Profile.Name = "System Administrator",
"Signed",
"Unsigned"
)
- In this formula, we use IF() function, which checks whether the user profile name is “System Administrator”.
- If it is the formula dynamically assigns the default value of the contract validation to “Signed”.
- Otherwise, the formula dynamically assigns the default value of the contract validation to “Unsigned”.
Step 12: Click on the “Check Syntax” button, to verify the formula.
Step 13: To continue, click on “Next”.

Step 14: Now, establish field-level security. Here, I want to set it for all the profiles, so click on the checkbox next to “Visible” to set it for all.
Step 15: To move to the next step, click on the “Next” button.

Step 16: In this step, we have to add the field to the page layout, and select the pages in which we want to add.
Step 17: To successfully create a custom picklist field with a default value, click on the “Save” button.

With this, we have successfully defined the formula for the picklist default value in Salesforce Classic Component.
Conclusion
With this, we have learned the Salesforce Picklist Default Value Formula. In addition, we have learned the procedure of defining the formula for the picklist default value in the Salesforce Lightning and Salesforce Classic Component.
Moreover, we have also covered the benefits of defining the picklist default value in Salesforce. Furthermore, the following are the topics that we have discussed:
- Salesforce Picklist Default Value Formula
- Picklist Default Value Formula in Salesforce Lightning
- Picklist Default Value Formula in Salesforce Classic
You may also like to read the following articles:
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.