Activity Forums Salesforce® Discussions why formula fields are useful

  • madhulika shah

    Member
    September 14, 2018 at 1:15 pm

    Hi Anjali,

    You’ve got a lot of data in your organization. Your users need to access and understand this data at-a-glance without doing a bunch of calculations in their heads. Enter formula fields, the powerful tool that gives you control of how your data is displayed.

    Let’s say you wanted to take two numeric fields on a record and divide them to create a percentage. Or perhaps you want to turn a field into a clickable hyperlink for easy access to important information from a record’s page layout. Maybe you want to take two dates and calculate the number of days between them. All these things and more are possible using formula fields.

    Thanks.

  • Avnish Yadav

    Member
    September 14, 2018 at 1:20 pm

    Hello Anjali,

    The formula field is useful as we can perform many tasks without writing a single code in Apex.

    Thanks.

  • Parul

    Member
    September 14, 2018 at 1:29 pm

    Hi

    It's a read only field, the value of formula filed evaluate from expression defined by us. If we update any value in the expression, it automatically updates formula field value. We can create formula fields in both standard and custom object.

     We can return formula result in 7 ways those are:

    1. Checkbox: Calculate a boolean value
    2. Currency: Calculate a dollar or other currency amount and automatically format the field as a currency amount.
    3. Date: Calculate a date, for example, by adding or subtracting days to other dates.
    4. Date/Time: Calculate a date/time, for example, by adding a number of hours or days to another date/time.
    5. Number: Calculate a numeric value.
    6. Percent: Calculate a percent and automatically add the percent sign to the number.
    7. Text: Create a text string, for example, by concatenating other text fields.

     

    Thanks

  • shariq

    Member
    September 14, 2018 at 9:55 pm

    Hi,

    Formula & Cross Object Formula Field in Salesforce: Formula Field is a read only field whose value is evaluated from the formula or expression defined by us. We can define formula field on both standard as well as custom objects. Any change in expression or formula will automatically update the value of formula field.

    It is a read only field, the value of formulafiled evaluate from expression defined by us. If we update any value in the expression, it automatically updates formula field value. We can create formula fields in both standard and custom object.

    We can return formule result in 7 ways those are:

    1. Checkbox: Calculate a boolean value
    2. Currency: Calculate a dollar or other currency amount and automatically format the field as a currency amount.
    3. Date: Calculate a date, for example, by adding or subtracting days to other dates.
    4. Date/Time: Calculate a date/time, for example, by adding a number of hours or days to another date/time.
    5. Number: Calculate a numeric value.
    6. Percent: Calculate a percent and automatically add the percent sign to the number.
    7. Text: Create a text string, for example, by concatenating other text fields.

    Creating this type of filed is like creating a normal salesforce field with data type formulae and we need to select result typed & provide expression.

    Hope this helps.

  • chanchal kumar

    Member
    September 17, 2018 at 10:39 am

    Here’s the use case of formula fields:

    • Let’s take an example of Account Object, which has 3 record types say (Group, Branch, Vendor) so If the Account RecordType is “Group”
    • Picklist value of Account “Status” is set to “Closed”
    • And Value in field ReasontoClose__c is Blank, the validation rule should fire.

    AND(
    ISBLANK(  ReasontoClose__c),

    ISPICKVAL( Status, “Closed”),

    RecordType.Name=” Group ”

    )

Log In to reply.

Popular Salesforce Blogs