---
schema_version: "1"
id: b37c6c02fe12c18a65ccaa3250ed63dd907edf4bce42823b0903bdf780211e7b
title: Tips for Building Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/tips_on_building_formulas.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.tips_on_building_formulas.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fbf35a9e8fd3319f149201cfd47d66226669c2cd6b0331170c3da542251765a0
description: Extend your Salesforce data with powerful formula logic. Access a collection of tips for using specific data types in your formulas, including dates, numbers, text, picklists, and record types.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Tips for Building Formulas

Extend your Salesforce data with powerful formula logic. Access a collection of tips for using specific data types in your formulas, including dates, numbers, text, picklists, and record types.

### 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>All</strong> Editions</td></tr></tbody></table>

- Formulas and Security
    
    Formulas ignore field-level security, which means a formula can inadvertently expose data from referenced fields that you’ve hidden from users. To protect sensitive information, apply field-level security directly to the formula field.
- Picklist and Multi-Select Picklist Formula Fields
    
    Learn about building formulas that reference values from picklist and multi-select picklists. Plus, find guidance on working with boolean checkbox fields and dealing with common errors. See [Tips for Working with Picklist and Multi-Select Picklist Values in Formulas](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_picklist_formula_fields.htm&release=264.0.0&type=5 "Get tips on building formulas that reference values from picklist and multi-select picklists. Plus, find guidance on working with boolean checkbox fields and dealing with common errors.").
- Date and Times
    
    Learn how to convert between date and date/time and work with time zones. Plus, find guidance on calculating durations and intervals, and handling fractional values in date calculations. See [Tips for Working with Date and Date/Time Formulas](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_date_datetime_formula_fields.htm&release=264.0.0&type=5 "Use these tips to avoid unexpected results in Date and Date/Time calculations. Learn about data type compatibility, calculating durations and intervals, handling fractional day values, and staying within valid year ranges.").
- Hyperlinks
    
    Learn about using formula fields that contain a `HYPERLINK` function, including how to control link target behavior and predict how relative and external links open. Plus, find guidance on supported URL protocols in Lightning Experience. See [Tips for Using Hyperlinks in Formulas](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_hyperlink_formula_fields.htm&release=264.0.0&type=5 "Get tips on using formula fields that contain a HYPERLINK function. Learn how to control link target behavior and predict how relative and external links open. Plus, find guidance on supported URL protocols in Lightning Experience.").
- Numbers, Currencies, and Percentages
    
    Learn how to work with percent fields using decimal values and how to reference auto-number fields as text. Plus, find guidance on mixing numbers with percentages and currencies, and understanding output limits and rounding behavior. See [Tips for Working with Numbers in Formulas](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_number_formula_fields.htm&release=264.0.0&type=5 "Get tips for using number fields in your formulas. Learn how to work with percent fields using decimal values and how to reference auto-number fields as text. Plus, find guidance on mixing numbers with percentages and currencies, and understanding output limits and rounding behavior.").
- Text and Strings
    
    Get tips for working with text in formulas. Find guidance on using quotation marks to insert or concatenate text, escaping special characters with backslashes, and more. See [Tips for Working with Text in Formulas](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_text_formula_fields.htm&release=264.0.0&type=5 "Get tips for working with text in formulas. Find guidance on using quotation marks to insert or concatenate text, escaping special characters with backslashes, and more.").
- Activity Fields
    
    Learn how to create accurate activity formulas by distinguishing between tasks and events. The guidance also covers handling activity-specific fields and correctly referencing polymorphic relationships like Who and What. See [Tips for Working with Activity Fields in Formulas](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_activity_formula_fields.htm&release=264.0.0&type=5 "Get tips for creating accurate activity formulas by distinguishing between tasks and events. Plus, find guidance on handling activity-specific fields and correctly referencing polymorphic relationships like Who and What.").
- Merge Fields
    
    Learn how to reference cross-object merge fields, work with person and business accounts, and more. Plus, find guidance on using a special merge field to reference the unique identifier for your Salesforce org in a formula. See [Tips for Using Merge Fields in Formulas](https://help.salesforce.com/s/articleView?id=platform.tips_for_using_merge_fields_in_formulas.htm&release=264.0.0&type=5 "Get tips for working with merge fields in your formulas. Learn how to reference cross-object merge fields, work with person and business accounts, and more. Plus, find guidance on using a special merge field to reference the unique identifier for your Salesforce org in a formula.").
- Record Types
    
    Learn about applying different workflow rules, validation rules, or lookup filters to different record types. The guidance also covers when to use record type names or IDs in formulas to apply logic based on a record's classification. This topic also covers limiting the use of the record type global variable to default value formulas, and deployment considerations for sandbox and production environments. See [Tips for Referencing Record Types in Formulas](https://help.salesforce.com/s/articleView?id=platform.referencing_record_types_in_formulas.htm&release=264.0.0&type=5 "Get tips for applying different workflow rules, validation rules, or lookup filters to different record types. Learn when to use record type names or IDs in formulas to apply logic based on a record’s classification. Plus, find guidance on limiting the use of the record type global variable to default value formulas, and deployment considerations for sandbox and production environments.").

#### See Also

- [Build a Formula Field](https://help.salesforce.com/s/articleView?id=platform.customize_formulas.htm&release=264.0.0&type=5 "Your custom formula fields require special attributes.")
- [Common Formula Errors](https://help.salesforce.com/s/articleView?id=platform.fixing_formula_errors.htm&release=264.0.0&type=5 "Review common errors that can occur with formulas and how to fix them.")