A formula is an algorithm that derives its value from other fields, expressions, or values. Formulas can help you automatically calculate the value of a field based on other fields (from Salesforce doc). Formulas can be used in many areas of Salesforce other than just Formula Fields, such as ...

learn more… | top users | synonyms

1
vote
1answer
16 views

Incorrect parameter type for operator '>='

My start/end date was Date and I have changed it Date/Time datatype after doing that my formula is broken: IF(ISPICKVAL(Employee_Status__c, "ACTIVE") , TODAY() >= Emp_Start_Date__c &&...
0
votes
1answer
19 views

Calculate Last task and Last Event age on Opportunity page

I have an issue. I have last activity age by using (Today()-Lastactivityage) to calculate last activity age. But I want to segregate it as last task age and last Event age. I have two custom field on ...
1
vote
2answers
99 views

Need help with NOT function

Hi I am a beginner at apex coding and salesforce. Here is my code that I would like to use the NOT() function. CASE(Lead_Source__c, "Self Generated", IF(Markup__c >= 0 && ...
0
votes
1answer
14 views

Report Filter - Cannot Use Formula?

I am trying to customize an existing Report to filter based on a formula field. It was created with a Custom Report Type of My Object with Child with Grand-Child. Now we want to filter it based on a ...
1
vote
1answer
36 views

Validation rule on Rich Text Area field

Using LEN() function, we are able to validate if a rich text area is blank, but when a rich text area with image is added, LEN() still say 0. How to validate whether rich text area field contains ...
1
vote
1answer
24 views

What to do when Formula Field is too big to compile

So I am having a problem. I already have written a formula for a field that I would wish to calculate. But the problem is that the I can't add any more code to that Formula field because then it gives ...
0
votes
2answers
47 views

Formula is to big to execute…What else can I use to write a formula for a field

Hi I am just wondering if I wanted to write a formula that computes a number for specific field, how else can I go about doing this? I am currently using the advanced formula section for the field and ...
1
vote
1answer
25 views

Max formula and blank

Can Max formula handle fields with blank values? I have three number fields field a, field b, field c with default value as blank(default custom field setting) Max(field a, field b, field c) is ...
1
vote
1answer
29 views

Dynamic formula

I'm trying to make a formula that dynamically gets a value from a field. By this I mean that I have defined a field, I want data from, in custom settings, and I want the formula to get the value of ...
0
votes
1answer
23 views

Undefined field CloseDate in Report custom summary formula

Hi I am very new to Salesforce. I'm trying to write a custom formula, stated below. IF(FISCAL_YEAR:MAX=2015, CASE(MONTH ( CloseDate ), 1,20000, 2,21000, 3,22000, 4,23000, 5,24000, 6,25000, 7,26000, 8,...
0
votes
0answers
28 views

How can I use the CASE() function in an HTML Email Template

I have a picklist custom field in the Contact object, Chats_Reward__c which has five values: Ribbon, Bronze, Silver, Gold, and Platinum. I would like to use a single email template to send an email ...
0
votes
1answer
31 views

Validation rule is not being triggered [duplicate]

I have field final result on which on certain values, I only want some of the users to make the changes. The problem is that the user Id which are not mentioned in the formulae are able to get the ...
1
vote
1answer
26 views

field update using workflow and formula function

In standard object Case there is Description field and there is text being inserted i'm looking for specific text/string "First Name" and i would like to move everything from the left of "First Name" ...
0
votes
0answers
29 views

Substring child field

I'm currently trying to substring a field of a child object in a formula to convert it to an integer and find the difference between several numbers in the field ([Lookup_Time__c].Time_name__c]). I ...
0
votes
1answer
40 views

Validation Rule to Check for Equal Values

I have written the below Validation Rule to check two values on an Opportunity record to ensure they equal each other in certain stages. However, during testing, it is confirmed that Users are ...
1
vote
1answer
28 views

Formula for examining the last 3 records on a child object

I have two objects. Work (Master Object) Field: Work Done Tasks (child object) Field: Work Done I want to create a formula field on the master record Work so that when the last 3 records of ...
3
votes
3answers
56 views

Formula works on page layout, but displays #Error! on Report

I have an issue. I have a text field to store survey completion date and time. I created a formula field to capture date only. DATEVALUE( completion_time__c) It is showing correct date on Page ...
0
votes
0answers
29 views

Display URL as text in advanced formula

I created a formula like this: "http://www.google.de/" & "#q" & "test" Now I want the output to be plain text, not a URL. This is due to the fact that URLs get messed up when exported to ...
1
vote
0answers
56 views

Reduce Formula size

I have logic in Account object for Formula field, but while i try to save it gives me error Error: Compiled formula is too big to execute (6,387 characters). Maximum size is 5,000 characters ...
0
votes
1answer
24 views

Make whole record read only when picklist value set to “Closed”

I have a picklist picklist1__c on my opportunity. When the user sets the picklist to Closed I want the validation rule to trigger and display an error message "You cannot edit a record that has been ...
0
votes
4answers
35 views

IF Statement producing correct 'False' value, #Error when True

Wrestled with this one for a while before deciding to ask the SFDC SE community's help: Basically, a formula field on a Child object is looking up a parent Object value IF(( ISNULL(Foo__r....
0
votes
1answer
31 views

Computations inside of an IF() Function

I was trying to add some arithmetic inside of an IF function for a custom formula field and it didn't appear to like the syntax... IF(AND(ISPICKVAL( Status,'In Progress'),ISPICKVAL( Priority ,'...
0
votes
1answer
48 views

Process Builder - Add Minutes,Hours to Event End Date

I want to make the Event End Date as NOW()+60 Mins in process builder while creating a new Event record. But It is adding 60 DAYS even though Event End date is date/time field. How do I add minutes ...
0
votes
1answer
43 views

How to calculate the duration between each status on lead object?

I have a requirement to display days lead has been in current status on Visualforce page. If lead status = "A". I have to show how many days that lead has been in same status. If status changed to "...
0
votes
1answer
12 views

How do I set a default value for a custom currency field where the default value is a formula or value from another field?

I need to create a custom currency field to allow users to enter a currency value (unit price) on a quote line. However I want to populate the field with default value using values from another field ...
1
vote
3answers
30 views

How to generate an error message using two tick boxes and a pick list?

I am creating a validation rule for an opportunity. Basically saying if you choose tick box A or tick box B then you must pick an option from the pick list. I am new to the formulas and I have got it ...
0
votes
3answers
51 views

Reducing the formula size

I am trying to write a formula field which uses another referenced formula inside it, hence the compilation size is longer than 5,000 characters. Does anybody know how to reduce the size of it? This ...
0
votes
1answer
24 views

validation rule making a field mandatory only if created after specified date

I want to make a field mandatory only on records created after a specified date. So if the opportunity created date is prior to current date then field wouldn't be mandatory but if opp. created date ...
1
vote
2answers
51 views

I Cannot Get an If Statement to Work

On the Account page, I have a lookup for Secondary Contact. I also have two formula fields: Secondary Contact Email and Secondary Contact Phone. If you choose someone in the Secondary Contact ...
1
vote
2answers
49 views

How to create formula field where i have to add 6 months to one date field?

I have one date field DOJ(date of joining). I have to create one formula field "CONFIRMATION DATE" where the date value will be DOJ+ 6months( whenever i enter some data in DOJ field). So how to do ...
1
vote
1answer
31 views

How to assign and sum up picklist values

I have a custom object with 3 picklist fields. I want to sum up the values of the picklist fields and get an average of the number and round it down. In otherwords, if picklist one has a value of 3, ...
-1
votes
1answer
24 views

How to Customize Custom Label data in formula field [closed]

I got a requirement to customize custom label data and display in a formula field. Like i have custom label called Deal Users and data like. Robin,Rivera,Jose,opp,Dcosta,James Now i want to display ...
1
vote
2answers
30 views

Ability to show a indicator next to a field if it is changed [closed]

Is there any possiblity that if I make any changes after saving the record,there a provision to indicate that this field has been changed like a indicator or so.But I would have to see the changed ...
0
votes
0answers
21 views

Default formule in text field

I am new to salesforce. I have two custom objects. One is Vob and other is Legal. I have a text field on Vob object having name as Rx OUT DED and I have created another text field on Legal object. I ...
0
votes
2answers
20 views

Validation Rule - either both entered or both blank

I'm trying to validate to allow either field1 and field2 both be populated or both be blank. I have tried this formula but does not seems to be working: IF( NOT(ISBLANK(field1__c)), NOT(...
3
votes
1answer
31 views

Formula compile error with lots of dates

I am receiving this error: Error: Invalid Data. Review all error messages below to correct your data. Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (...
0
votes
2answers
31 views

error with formula: IF(“Close Date” = “26/05/2016”, “01/06/2016”, “0”)

i am trying to create a formula in the report so that if the close date is e.g 26/05/2016, return value would be 01/06/2016 formula ; IF("Close Date" = "26/05/2016", "01/06/2016", "0") But i keep ...
0
votes
3answers
33 views

Help in writing formula and forming logic

I have custom Picklist field called status on Contact. my requirement is: we can set contact status to 'On Hold' and save only if the prior value of contact status was 'Active'. else display an error ...
0
votes
2answers
44 views

Help required in building formula for validation rule

I have 3 objects Contact(standard), Volunteer job(custom) and Volunteer hour(custom). Volunteer hour is a junction between contact and Volunteer job. Contact has a custom picklist field 'status'. my ...
2
votes
1answer
35 views

Including commas and and's in formula for combining line items

I have a formula field that I built in a custom object that combines various fields into this one field for a mail merge. The custom object is called Product Donations, and there are about 12 fields ...
0
votes
0answers
31 views

How do I calculate hours between 2 date/time field in business hours

I have created the below to capture hours between 2 date/time field multiplied by the staff on site less 1 hour that can't be charged for. Hours are 7am - 5pm (10 hours). 7:00 am GMT is 17:00 (5:00 ...
1
vote
1answer
24 views

I have a formula field. I need to display a certain value depending on the local time of the day [duplicate]

I have a formula field. The field should display a certain value depending on the local time of the day. For example, if it is between 9:00 and 12:00 - morning, 12:00 and 3:00 - afternoon, and so on. ...
2
votes
1answer
28 views

Formula field error

I have a formula field created that should be displaying Red, Yellow, or Green (words not colors), and I'm getting a strange error that I just can't suss out. The problem comes after the word "Green" ...
-1
votes
2answers
25 views

Account Status should set to Modified when an Account is Edited [closed]

I need to set the Status Picklist on Account object to "Modified" When an account is edited. Thanks!!
0
votes
1answer
36 views

Calculate hours between 2 date/time fields x staff on site

Works on site have a log-on and log-off time, I have fields set up to capture these times, plus a field for number of staff on site. I want to create another field that will show me chargeable hours, ...
7
votes
2answers
100 views

Formula field is not Working as expected

Hi friends i create a formula field to know the created task is for contact or opportunity or lead.So i tried to created a formula field Based on whatId & whoId. But it throws syntax error.can ...
2
votes
2answers
50 views

How to match mobile phone numbers for incoming SMS messages?

I'm looking at receiving SMS (text) messages in Salesforce and the formatting of the "From" mobile phone number (in a Twilio Webhook call) is: +35386xxxxxxx (where 353 is the country code in this ...
1
vote
1answer
31 views

Error: Function PRIORVALUE may not be used in this type of formula

I have trying to build a formulae in workflow on the Final result which should show error message if the the prior value of Final Result is either (ACCEPTED,Need More Information-Incorrect Patient/...
1
vote
2answers
76 views

Time Data Type and not Time Date

I'm trying to allow time only for data entry. I want to avoid as much apex and visualforce as possible for this project. I can certainly do it but I'm trying to keep this full configure for this ...