Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

1
vote
1answer
43 views

Create a formula text field to display prior value or text field?

I'm wondering if it is possible to create a formula field that will display the previous value of a text field. Example: If an account name is changed, display that previous value in the formula ...
0
votes
1answer
23 views

How to filter records with specific time duration

Our organization time zone is pst. And user timezone is also pst. So, I need the records created between 4:31 PM pst to 4:29 AM pst. I tried to create a formula field like this. And it's showing ...
0
votes
0answers
30 views

Create Formula Field based on Report created date

I have a three date field and one pick-list field. Based on the Start Report Date i need to update Last Report Date & Next Report Date Automatically. Date Field Start Report Date Last ...
0
votes
1answer
46 views

Is it possible to convert numbers from Base 10 to Base Alphabet and back again using formula fields?

For shits and giggles, I am working to create a spreadsheet application (comparable to Excel, inspired by The SCells Spreadsheet) on Salesforce.com Each spreadsheet cell will correspond to one ...
0
votes
1answer
21 views

Custom Formula Field

I am attempting to create a custom formula field on the Case Object, which brings over the To Address field from the Email Message Object. However, when a new Case is created from Email-To-Case, the ...
0
votes
1answer
44 views

Creating a formula field in the opportunity with two IF statements

I have been having troubles creating two if statements within a formula field. I want one statement to calculate amount - expected renewal amount to give us the total upsell amount. But in the event ...
3
votes
1answer
141 views

Can someone sanity check my DateTime math? (Related: Can someone explain the “long” data type like I'm 5?)

Attempting to implement a formula similar to that outlined here, namely where check a box if NOW() - CreatedDate is more than a couple seconds. I originally had ((NOW()-CreatedDate)*10000) > 1, ...
0
votes
2answers
27 views

Error saving formula field because IF statement is too long

I'm trying to create a formula field that will tell me the region which a country is part of. Problem is that there are too many. The code below is just for European Union and Europe and I'm already ...
2
votes
1answer
58 views

Difference in minutes between two datetime fields

I need to calculate the difference in minutes between two datetime fields inside a formula. The following works if the dates are different (date2__c-date1__c)*24*60 But if its the same date then ...
0
votes
3answers
22 views

Formula field value for old records and another value for new ones

I have formula fields which calculates the net value and total value for sales order object, I want to change these formula fields values but not affect the old value for sales order which is packed, ...
0
votes
1answer
20 views

Formula field to be changed when a record gets 'reopened'

I have a custom object named Requirement (a Job) that have several related child objects (Applications, Submissions, Interviews, Placements etc). On the Requirement object, I have a formula field ...
0
votes
2answers
25 views

custom field formula

I have two custom objects. Reservation__c and MoneyReceived__c and they are lookup relationship. I want Reservation__c.totalReceived__c = sum of all MoneyReceived__c.amountReceived__c. There are one ...
0
votes
2answers
19 views

Sum Two Customer Formula Fields

Is there a way to sum the value from two custom formula fields into a separate formula field? I am trying to set up a prospect score in Salesforce based on the customer's lead source. Due to the ...
0
votes
2answers
23 views

Date/time field cant be selected in scheduled action in Process Builder

I have a custom object with a custom date/time formula field. When I try to select this field in the processbuilder the field does not show up. Am I missing something? See image
0
votes
0answers
24 views

Need help using CASE to reduce formula size

I'm new to this forum. But, I'm thankful to everyone on here. Great community!! I have a large formula that has too many characters (3957). I'd like to use CASE to make it more efficient, but I've ...
0
votes
1answer
42 views

formula field to retun a specific value

I have below formula field now I need to update this formula as if one of the fields is blank then it should return 1 and if 2 fields are blank then it should return 2 and so on for 3, 4 and 5. IF( ...
2
votes
1answer
26 views

Restrict Auto case-number field to specific record type

I've a custom auto case-number field for one of my case record type (Quality Report). Every time a new case is created, the auto case number is generated (ex: QR-1287). However, the auto number field ...
0
votes
1answer
23 views

HYPERLINK function in a formula field returns different results

Background I have a custom object Recipient__c with a Lookup relationship to Contact. Also it have another Master-Detail relation to another custom object SomeObject__c. The Name field for this ...
0
votes
1answer
33 views

Someone please help me compress this formula - Compiled formula exceeds 5000

Someone please help me compress this formula - Compiled formula exceeds 5000 IF(Today()<Date(Year(Today()),7,1), Case((Year(Pledge_Submitted_Date__c)+YearsToGo__c) -Year(Today()), 4, ...
0
votes
0answers
33 views

MAKE LIST CONTAIN 6 DATE FORMULA FIELD

I have list of Plan Date and Reminder Date (14 days before Plan Date). But, both of the fields stop counting after December 2018. I use Date Formula Field on Reminder Date. How can I make it ...
0
votes
1answer
70 views

How Can I Get A Substring From A Long Text Area Field?

I have a Description field of type Long Text Area. I'm trying to get the first few lines to display. 1. I tried creating a formula field LEFT(Description, 500) I get Error: You referenced an ...
1
vote
1answer
198 views

Formula Field - Case Function

Am trying to build a formula field with multiple IF conditions, so decided to go with Case function, below is the return statement based on the picklist value 0 Member 2 Member 3 Member 22 Only a ...
0
votes
1answer
23 views

We have to update a field value from other object field value based on a certain condition via formula field or not

We have 2-objects called A,B and A is the parent and B is child. We need to update X-field value(Date data type) on B object with A object's Y-field value(Date) whenever A-object's STATUS changes to ...
3
votes
1answer
49 views

Process Builder can't access Platform Event parameters in formula?

I created a Platform Event, and now I'm building a process that is triggered by the Platform Event. The Platform Event parameters either contain a ContactId or a LeadId, but not both. The process I'm ...
0
votes
0answers
30 views

Formula field is not working

I have a Formula Field Status_Image_Url__c in Case Object . I am confused why everytime I update the status of my Case from "Investigating" to "Submitted to Engineering" the image is not ...
2
votes
0answers
154 views

Can Lightning SLDS icons be displayed in formula field without using static resources?

I want to display an icon in a formula field based on the value in another checkbox field on my object. I would like to use the standard Lightning SLDS icons here. I've found a way to achieve this ...
5
votes
1answer
108 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....
0
votes
1answer
29 views

Reducing Size of Case Statement

CASE( RegisteringCountry ,"Argentina", "India", "Australia", "India", "Bangladesh", "Singapore", "Belgium", "India", "Bhutan", "Singapore", "Brunei Darussalam","Singapore", "Brazil", "India", "...
0
votes
1answer
51 views

How to create logic to lookup for custom case number on case object? [closed]

I have a Visualforce page which is used to create customer service related cases on the case object. We have a custom case number value for each case created (QR-1001, QR-1002 .....). For certain ...
2
votes
2answers
112 views

Formula field to get records created this week on activities

I have a requirement where a checkbox is to be checked if a record is created by a specific profile this week on activity. So, I got the following formula: IF(CreatedBy.Profile.Name = "Territory ...
0
votes
1answer
61 views

First error: common.exception.SfdcSqlException: ORA-00920: invalid relational operator

I have created formula field named "Second Audit Required" as shown below : IF(And(AND(Text(Status__c)='Closed',TEXT(ServiceStep__c)='Treatment',Order__r.Account_Name__r.Account_Types__r.Name='...
0
votes
3answers
84 views

Merge Date & Time field in to datetime field using formula field

We have to separate fields to pick appointment date & appointment time in Custom object. Now we have to filter out appointments between two dates (w/ time), so I need to compare appointment date &...
3
votes
1answer
71 views

recalculateFormulas() throws an unexpectedException. Unable to create/update fields

I have a function in Apex that sets a few fields on my custom object and that also calls the recalculateFormulas() function on the object. I call my function from Salesforce through a custom button. ...
1
vote
1answer
37 views

Picklist values in a formula on a validation rule (along with text fields)

I have a validation rule on the contract object which doesn't allow a checkbox to be checked by users until they have completed the required fields. The issue is that some of these fields are picklist ...
0
votes
1answer
20 views

How do I access the Phone field (Event standard field) on a formula on Activity?

I'm trying to create a custom formula field on Activity that looks something like this: SUBSTITUTE(Phone, '-', '') However, the syntax checker says the Phone field simply doesn't exist, even though ...
0
votes
1answer
40 views

Calculate hours from two text fields

I have a custom object called Log. It has two fields : StartTime__c and Endtime__c. R1.StartTime__c = '05:58 am'; R1.EndTime__c = '11:54 pm'; The number of hours between StartTime__c and ...
4
votes
2answers
245 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 ...
0
votes
0answers
18 views

formula field returning currency while changing the currency sign

Scenario I need to have a different currency symbol based on another field which can store the currency code or symbol. So like if I've field called Currency where the value is "EUR" so in formula ...
0
votes
0answers
20 views

How To Map A Custom Number Formula Field To A Custom Number Field?

I have set up Big Objects and I am trying to map a custom number formula field (which is advised by Salesforce to use as a "Workaround" to resolve the limitations on field types in big objects) to a ...
0
votes
0answers
52 views

Difference between two datetime fields giving negative values

I am using the below formula to calculate hours between two datetime fields.But total is coming as -16. What is the problem happening. Start_Date__c = 30/07/2018 06:59 End_Date__c = 30/07/2018 14:29 ...
0
votes
2answers
24 views

Can I stop a process if the field update values are the same or similar?

I have a process builder that creates a case when an Account name has been changed. My company builds software for hospitals, which fairly frequently change ownership and names. The case is to alert ...
0
votes
2answers
34 views

How to get formula field from invoice without update

I have made a counter for invoices for several offices. The current office to create an invoice is determined by a formulafield. How do I get this in my testclass I tried to query the invoice but it ...
0
votes
1answer
88 views

List View - display names as Last Name, First Name in Lightning

In classic, the Name field for Contacts in List View always displayed Last Name, First Name. In lightning, they seem to have switched this to first name last name. I would like to unswitch this. I ...
0
votes
1answer
17 views

Text formula field does not shows the full id of an custom object

I have a formula field called CandidateKey__c which can hold either an opportunity or account id. I have noticed that the CandidateKey__c is not showing the full Id of opportunity or Account objects. ...
0
votes
1answer
38 views

If statement based on created by profile name to show value is custom formula field

This new field will be called "Line item Total Test" on Opportunity Product. This Formula is not working- IF(CreatedBy.Profile.Name = "Standard User", TotalPrice), IF(CreatedBy.Profile.Name = "...
0
votes
0answers
24 views

Formula logical operators currency madness

Either there is something really wrong going on with SF or I'm going crazy. I have some fields: Total__c, Amount_Received__c, Amount_Refunded__c (Currency) Amount_Paid__c (Formula Currency) ...
0
votes
1answer
23 views

formula values are not getting in URL in Production

I created a custom button on custom object. Behavior= "Execute Javascript" Content Source="Onclick Javascript" I have written the following code in sandbox. It is working in Sandbox. But, In ...
0
votes
1answer
223 views

Error: Field CompanySetting__c does not exist. Check spelling [duplicate]

I can't figure out what's wrong with this field formula. Everything below in quotes has been copy/pasted directly so there are no typos AFAIK. Custom object API name = CompanySetting__c Custom ...
0
votes
1answer
184 views

check if a particular date falls in the current quarter

I have a requirement to check if a particular date field falls in the current Quarter. Hence for this I had used a Boolean formula Field which returns true if it falls in current quarter and false if ...
0
votes
1answer
39 views

Is Salesforce adding decimals wrongly?

Problem Description: Having weird decimals calculation Field 1(formula(Currency)): 0.53 Field 2(formula(Currency)): 5.27 Formula field Total = field 1 + field 2 Total = 0.53 + 5.27 Expected: ...