Questions tagged [formula-field]

A formula field is a field that automatically calculates its value from other fields, expressions, or values.

Filter by
Sorted by
Tagged with
31
votes
1answer
611 views

What are the compiled costs of each Formula function

Each formula function has a compiled cost that contributes towards the hard 5000 compiled character formula limit. What are the current compiled costs associated with each formula function?
14
votes
1answer
1k views

Salesforce1 and HYPERLINK() showing raw html

Has anyone found a way to have a field, which is a formula field that uses HYPERLINK(), to display correctly in the Salesforce1 APP? Currently in the browser based Salesforce1 it functions correctly, ...
13
votes
2answers
6k views

Find line break in formula field

I noticed that the Contact.MailingStreet field can be accessed line-by-line in reports with the Mailing Address Line 1, Mailing Address Line 2, and Mailing Address Line 3 fields. I want to create ...
12
votes
3answers
1k views

Create a currency formula field with no decimal places for Standard Page Layout

We have the following challenge with currency fields: Scenario: On child record(s) (in a multi-currency org) we have pricing information which is stored as a currency value with 5 decimal numbers in ...
11
votes
1answer
2k views

Are formula fields so inefficient?

I'm working with some colleagues on a project which the clients would like optimized, as they feels some things are too slow. One of my colleagues has suggested that we should cut down on the use of ...
9
votes
1answer
989 views

Roll up Count of booleans

Is it possible to use a roll up or formula field to count the number of "true" or "false" values on a boolean field of a detail record? Example: Account <-Master-----Detail-> My_Object__c ...
9
votes
2answers
188 views

Field filter does not Work for Text Formula field used in SOQL

I have a simple SOQL query on Account which has a field Full_Address__c which is joint of Billing Street, City Zip. When I use this field as a filter it doesn't return the records: Example: String ...
8
votes
4answers
4k views

Custom MetaData Types reference in Formula Field

I have a custom metadata type and a field in it with a value. I am creating a formula field on an object(TestObject) where I would like to reference a value from the above custom metadata type into ...
8
votes
1answer
4k views

What makes a formula field non-deterministic and hence not available for a custom index?

The Knowledge Article: 000006007 - Custom indexes for an organization to help improve performance lists the following in relations to indexes on formula fields: Note: Formula field can also be ...
7
votes
4answers
2k views

Why isn't OrderProduct TotalPrice standard field available in formula merge field list

I am trying to create a custom Formula field on the OrderProduct standard object that is new with the Spring 14 release. However, while the standard fields ListPrice & UnitPrice are available in ...
7
votes
1answer
685 views

Birthday Alert Every Year

I would like to achieve this by configuration only, my mainly question is about can this formula condition in criteria fires off every year in PB? Basically I am setting up a PB to evaluate Contact's ...
7
votes
3answers
459 views

Data Not Available? Can't edit a custom formula field formula

Any ideas why I would get a "Data Not Available" error when editing a custom field? In this specific instance I'm editing a formula field, and I'm able to edit and save changes to the description and ...
7
votes
1answer
2k views

Rounding a Formula Field

I have a formula field that is returns a currency and is set to 2 decimals. It displays fine, but when I access the field through the API it returns 6 decimals. 12.493587 should round to 12.49 ...
6
votes
1answer
229 views

Formula field value, GUI vs API/Apex

I observed a strange behaviour that I don't find in documentation or, is the first time that i get out this behaviour. I created a simple formula field on user, Profile_name__c (formula field of ...
6
votes
1answer
564 views

Can existing formulas that reference encrypted fields be structured to work with or without Shield Platform Encryption?

We have a customer who wants to use Shield Platform Encryption but that has the constraint that you Can't reference encrypted fields in Formula Field Types with these alternatives suggested: Use WF ...
6
votes
1answer
978 views

Phone Field in Custom Object

When I add Phone field in custom Object, I want to the user to enter minimum of 10 digits, if the user enters less than 10 digits they should get error [Just the numbers, no need of any special ...
5
votes
2answers
411 views

Populating a formula field with a trigger

I have an object which is sometimes created by a user manually, or under some circumstances is created by a trigger. It has a formula field which gets populated by a related object's field when a user ...
5
votes
2answers
715 views

Formula Fields Lock when Records are Locked?

Looking around the web I could not find any information on if a Formula field locks (data become static) on records that have been locked in an approval process when the values in the formula are ...
5
votes
2answers
302 views

Picklist value with “Like”

I have to select a value from a pick list having values starting with 'PR' I have tried ISPICKVAL(Order_Type__c, 'PR%') But I am not able to use expression Like or wildcards here.
5
votes
2answers
8k views

What is the diffrence between formula field and Rollup summary in Salesforce?

I have a confusion on whether to go for formula fields or roll up summary fields in some scenarios. As we can calculate the aggregate values in formula fields also, then why/when should we go for Roll ...
5
votes
2answers
4k views

Counting multi-select picklist selections in a formula

I would like to ask something about FORMULAS. I have a multipick list field where the user select one or more options(text), i would like to count how many options he select and multiple that for one ...
5
votes
1answer
137 views

SOQL returning incorrect value

This is throwing me for a loop. I have a custom field on user, Backend_User__c. The formula is pretty simple: IF( OR( Profile.Name = "API Only", Profile.Name = "Boldchat API Only", Profile....
5
votes
3answers
1k views

Dynamically get result of a VF field's formula, using Apex

How can I get the result of a formula ("field update"/"workflow rule"), in Apex, without hard-coding it? There is a field whose value (calculated on upsert) is the formula result. I have dismissed ...
5
votes
1answer
152 views

How to deduct one month from a date in a formula field

I have a Date field in my object start_date__c. I need a formula field which deducts one month from startdate. Any idea how do i achieve this ?
5
votes
1answer
544 views

Executing workflow/trigger before autonumeric field is calculated

The scenario is: I have an autonumeric field Perspective_Code__c. I have a text field Original_AC_Code__c. I have an external id text field Opportunity_Code__c. When a record is inserted/updated, I ...
5
votes
1answer
1k views

How do I specify an account in the Related To field in a custom Global Action Predefined Field Value?

I have created a custom Global Action, and am trying to predefine a value for the Related To field. Related To appears in the picklist of available fields for Predefined Values, so it appears this is ...
5
votes
1answer
171 views

Phone to String Formula Field

Suppose I have Contact Record with FirstName, LastName and Phone, where in phone i am inserting my Mobile no. e.g. FirstName: ABC LastName : XYZ Phone : 9921125797 MyFormulaField ...
5
votes
2answers
146 views

Error in formula field result

My requirement is exactly looking like This question. The question has solution almost except in one case. The issue is, If we select 31st march, Then the result should like 31st march+ 6 months, ...
5
votes
1answer
619 views

Destroying dependencies with Ant Migration Tool

I have a very simple case that I'm surprised Salesforce migration tool can't deal with. I have two date fields on Account: Open and Closed. I then have a formula field that sets a boolean to true if ...
5
votes
1answer
2k views

Calendar Week Date Range as a formula field

Is there anyway to modify this to look at a different date versus Today? Such as a custom date field? Any help would be greatly appreciated! Is there a formula to display the calendar week I want ...
5
votes
4answers
916 views

Formula to find Minimum date value of current month in date field across child objects

I have a Date field which contains, across several child records: (2014-07-1,2014-07-5,2014-07-8,2014-07-9,2014-08-1,2014-08-5,2014-08-8........), now in these values I want to get the current month(...
5
votes
1answer
3k views

How to extract values using Salesforce Formula fields

I have one Text field on Custom Object as follows - Product_Info__c = 'DESKTOP:10,LAPTOP:20,MOUSE:20,PHONE:25' //sample value I want to create new formula field as DesktopCount__c which will result ...
5
votes
2answers
403 views

Parent to child on trigger update

I have two object X and Y. Y is child of X. Object X is having a field called Title (Long Text Area). I want to show this field on Y also. Cross-reference formula field will not work since Title is a ...
5
votes
1answer
678 views

Partner Account ID-Lead Object

There is Partner Account field on lead object. Salesforce help says, Description:ID of the partner account for the partner user that owns this lead. Available only if Partner Relationship Management ...
4
votes
2answers
440 views

Why formula field can not tackle the following issue?

While preparing myself to the Developer 1 certification I met the following question: Universal Containers requires a Service Representatives to update all Cases at least once every three days. To ...
4
votes
2answers
518 views

Formula field in SOQL - Performance Impact

Scenario Let's say I have two custom obejcts - Student and Class. The Class object is connected with object Student through lookup relationship. The Class object also has a formula field (...
4
votes
2answers
151 views

Formula field image BETWEEN numbers

I am having some trouble with a happiness meter formula field based on NPS score in our surveys. Here is what I have so far: IF( NPS__c >= 9, IMAGE("/resource/Misery09", "Promoter"), IF( ...
4
votes
1answer
916 views

Is a TODAY() value in a formula field updated every day?

I want to use TODAY() in a formula field to calculate a person’s age based on the value in their date of birth field. Then I need to pull this field into a report. Will the TODAY() value be updated ...
4
votes
1answer
74 views

Formula Field Changing the Date to Today

I have made a formula field to populate the date to today when a checked box is true and get locked its changing everytime its edited and saved. Like if the checkbox was true on 8/7/2015 It changes ...
4
votes
2answers
2k views

Is there a formula I can use to count the occurrence of a word in a string?

What I'm trying to do is to have a formula on a record, that counts the occurrences of a specific word from within a string field on the same record that holds a paragraph of text. If for example ...
4
votes
2answers
6k views

Formula field for getting a first and last word from the string

i need a help with a formula. I want to create a formula that will select the firts name and the two last names and input them in a box. ps: i m portuguese and we have a lot of family names thats why ...
4
votes
4answers
630 views

Text Formula String Concatenation - Omit Trailing Comma

Scenario : I have 7 checkbox fields. For example say it is Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday. In Formula field I want to display all that are true as comma separated ...
4
votes
2answers
912 views

Can anyone help with a formula to pull an email address from a text string in a standard field?

I am trying to pull an email address from a text string in the standard "Description" field on Case object. The below formula is correctly pulling everything AFTER the "@" symbol in the email ...
4
votes
3answers
2k views

Profile picture in formula field

I'm trying to get the user's profile picture to display in a page layout through the use of a formula field (image function). But I can't find the profile picture in the user object. Is it possible at ...
4
votes
1answer
4k views

How to use IF Statement in Formula field for checkbox

I want to copy data from one field in another if checkbox is true, I know I can do it by trigger but I want to do it in formula field, I don't know how to check the checkbox field my code is like this ...
4
votes
1answer
231 views

Using advanced IF in Formula field

I am trying to get the percentage of process completion. I have some checkboxes, and I want to check if each one is checked or not. For every checked box, I will increase some value and then get the ...
4
votes
2answers
7k views

How can I use a formula field to retrieve a record in a lookup

I have created a lookup field between the Quote Line Items object and a custom Discounts object. I want to retrieve a certain discount dependent on discount code and product category. My Discounts ...
4
votes
1answer
3k views

CASE function with Boolean

I am trying to make a checkbox (boolean) formula field on a custom object, using a CASE function to set the value. I have 5 or 6 values from a picklist that I would like to set the new checkbox to ...
4
votes
1answer
599 views

How to check cross-object formula usage count?

Salesforce allows a maximum of 10 unique relationships per object in cross-object formulas per https://help.salesforce.com/apex/HTViewHelpDoc?id=fields_creating_cross_object_notes.htm&language=...
4
votes
3answers
307 views

How to construct mileage expense formula without hard coding the mileage rate into the expense field

I have created a "mileage expense" formula field which calculated the "miles" field by the mileage reimbursement rate - $.56 - hard coded into the formula. Mileage reimbursement rates change at least ...