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

Questions tagged [formula-field]

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

1
vote
2answers
32 views

Possible to view all formulas of formula fields on an object?

Getting this error: " This record could not be loaded because it includes too many formula fields with complex formulas, or too many custom fields. Ask your Salesforce administrator to remove some ...
0
votes
1answer
28 views

Formula that uses IF statements not working

I am trying to use a formula field on the Campaign Member object to pull from either a Lead or Contact. The Formula Text field works but the Formula Number field does not, and I am not sure why. So ...
0
votes
0answers
24 views

Salesforce Formula Field - Not able to calculate [closed]

No syntax error but still not able to calculate the equation ( Loan_Amount__c * Loan_Interest__c * ( 1 + Loan_Interest__c ) ^ Number_of_EMI__c ) / ( ( 1 + Loan_Interest__c ) ^ ...
0
votes
1answer
13 views

Average of orders placed by an user

I have a requirement where I need to get the average number of Users who are placing orders each month. If I get the count using Roll up summary field, it will be the copmplete count of the year and I ...
0
votes
1answer
31 views

SFDC formula field to convert decimal number to hex string

I'm looking to convert an auto-number field value to a hex string formula field. My auto-number is not going to be larger than 999,999. I found some suggestions on the net (thanks Chris Gary) and ...
1
vote
1answer
31 views

Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,459 characters). Maximum size is 5,000 characters

I have a Formula Field(Time_Spent_Technology_Setup_Number__c) to stop calculating time based on the Status. Whenever i am trying to save the field it is throwing below error: (In the logic I am not ...
0
votes
1answer
21 views

Get full length decimal value of a managed field with decimal places set to 2

I have a Managed field Number(16, 2) of which number of decimal places cannot be edited. For Example, if I enter 1.2391276549 into that field, It is displayed as 1.24 (as we know that salesforce ...
1
vote
1answer
32 views

How to get level change date

I have a field on Account named Level. It contains values viz., Manager, Assistant Manager, etc. I need to retrieve accounts with their level in Jan 2017 and Dec2018. How to get the data. I tried ...
2
votes
2answers
32 views

Multiple Checkboxes in Formula Field

I'm sorry if the title is completely butchering what I'm looking for, please let me know if should be updated. Here's what I'm struggling with: I have 11 checkboxes on an opp layout. I need the ...
0
votes
1answer
12 views

If denominator contains more than 1 field and if the formula results in divide by zero error, how to avoid them?

I have a formula field in Salesforce which uses the below mentioned formula and it often results in divide by zero error and if i use conditions to check if the resulting value is zero, then it ...
0
votes
0answers
32 views

Split Address Field into separate fields based on line-break

This an old and common question though I need to split the Billing street based on line-break since it's a TextArea field value are entered on a separate line. I need to split every line and store it ...
1
vote
1answer
37 views

Why formula field in not allowed in custom metadata

I had a requirement where I need to show list of buttons in a record edit form page. These values I am taking from custom metadata record. Fields in custom metadata records are Market(Logged in user's ...
1
vote
1answer
33 views

Convert Date field's value into milliseconds

Could someone please help me with a formula to convert Date field's value into milliseconds. I need the millisecods to be calculated from 01st Jan 1970. Thanks in advance. Convert Date
0
votes
1answer
13 views

Formula for a field

How can I create the following formula field (with API name Username) on Contact? First letter of FirstName + LastName + Number, such that if the combination is not unique, the number would make it ...
0
votes
1answer
30 views

Syntax Error in Formula Field [closed]

Error: Incorrect parameter type for function 'IF()'. Expected Boolean, received Text Code: ( VALUE(TEXT(Core_Competencies__c)) + VALUE(TEXT(Experience__c)) + VALUE(TEXT(Leadership_Skills__c)) + IF(...
3
votes
1answer
52 views

How to turn datetime into year formula without the dot

I am using the following formula to get the year: YEAR(DATEVALUE( ActivatedDate )) But this ends up whith the following 2.018 instead of 2018. How do I remove the . from 2.018?
2
votes
1answer
65 views

How to capture the Salesforce Lightning URL in a custom formula field

https://example--dev.lightning.force.com/lightning/page/home?0.source=alohaHeader This is the URL and I want to capture only https://example--dev.lightning.force.com/lightning in a custom ...
1
vote
1answer
93 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
24 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
35 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
61 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
25 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
47 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
149 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
29 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
182 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
30 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
21 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
24 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
44 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
1answer
43 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
43 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
79 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
1answer
111 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
401 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
24 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
69 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
34 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
275 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
111 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
32 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
63 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
188 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
90 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
159 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
132 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
65 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 ...