---
schema_version: "1"
id: 9d4e29d6aff3b12803c6a5b52fb0ce204fdf89fc5aec2d46e318499d3d0c349d
title: Useful Default Field Value Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/fields_useful_default_field_values.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.fields_useful_default_field_values.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a3b8aa1de79749286cd8e0b4814d92e6a107b1faaa0f52a480989c0c04b91210
description: How to apply default field values based on maximum discount rate, product language, or tax rate by city.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Useful Default Field Value Formulas

How to apply default field values based on maximum discount rate, product language, or tax rate by city.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Contact Manager</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
      <colgroup>
        <col style="width:50%">
        <col style="width:50%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d188573e81">User Permissions Needed</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d188573e81 ">To view default field values:</td>

          <td class="slds-cell-wrap" style="vertical-align:top;" headers="d188573e81 ">View Setup and Configuration</td>

        </tr>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d188573e81 ">To define or change default field
            values:</td>

          <td class="slds-cell-wrap" style="vertical-align:top;" headers="d188573e81 ">Customize Application</td>

        </tr>
      </tbody>
    </table>

## Maximum Discount Rate

Your organization applies different discount rates to opportunities based on the department of the person creating the opportunity. Use this example to set a default value for a custom field called Discount Rate on opportunities.

```
CASE(User.Department,​​ "IT", 0.25, "Field", 0.15, 0)
```

In this example, the formula inserts a discount rate of 25% on any opportunity created by a user in the IT department or 15% on any opportunity created by someone in the Field department. A zero is applied if the creator doesn't belong to either of these departments. This field is a custom percent field on opportunities that uses the standard user field Department.

## Product Language

You could associate a product with its language so that your users know the type of documentation or adapter to include. Use this default value formula to automatically set the language of a product based on the country of the user creating the product. In this example, the default value is Japanese if the user's country is Japan and English if the user's country is US. If neither is true, the default value unknown is inserted into the Product Language field.

```
CASE($User.Country ,​​ "Japan", "Japanese", "US", "English","unknown")
```

## Tax Rate

Use this default value formula to set the tax rate of an asset based on the user's city. Create a custom percent field with this default value.

```
IF($User.City = "Napa", 0.0750, 
 IF($User.City = "Paso Robles", 0.0725, 
  IF($User.City = "Sutter Creek", 0.0725, 
   IF($User.City = "Los Olivos", 0.0750, 
    IF($User.City = "Livermore", 0.0875, null
    )
   )
  )
 )
)
```

In this example, a tax rate of 8.75% is applied to an asset when the user's address is in the city of Livermore. When none of the cities listed applies, the Tax Rate field is empty. You can also use the Tax Rate field in formulas to automatically calculate taxable amounts and final sales prices.

#### See Also

- [Default Field Values](https://help.salesforce.com/s/articleView?id=platform.fields_about_default_field_values.htm&release=264.0.0&type=5 "Prepopulate field values with defaults to save your users time and improve consistency. Default field values make your users more productive by reducing the number of fields they must fill in manually.")
- [Default Field Value Considerations](https://help.salesforce.com/s/articleView?id=platform.fields_default_field_value_considerations.htm&release=264.0.0&type=5 "Be aware of the behavior and rules when you assign default values to custom fields.")