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
votes
0answers
10 views

calculation basd on one constent and one variable and one unknown [on hold]

i have a custom object in salesforce, also i have one number field and it is constant (meaning the user will always put in a number in that field). Also i have two fields in the same object both are ...
0
votes
1answer
40 views

ERROR : Complied formula is too big to execute 6050 .Max size is 5000 chars

I have a requirement : 1)If Commercial_Vs_Government__c ,"Government" AND Region__c = 'North America' should be only "Public Sector". 2)Country is : CA then value will be CA. 3)when ...
1
vote
1answer
24 views

Why am I receiving a 'Syntax Error' when using a CASE function?

I've been looking for answers to this question for a couple days now and haven't found anything. I am trying to assign a field a value (number) based on a picklist value from another field. What ...
0
votes
0answers
20 views

Replicate Cross Object Formulas with Apex Framework

Thought I would ask the question before I start creating! We have hit the number of references limitation on a few objects - you know the 10 references one which can be raised to 15 (but that's as ...
1
vote
0answers
12 views

Docusign Formula field use via SOAP: Formula disappear after sending to the recipient

I have a docusign formula field in my template, If I generate the envelope direcly with docusign console and send to the recipient, I can see the formula is working fine, If I generate the envelope ...
2
votes
1answer
21 views

Formula Not Recalculating Winter '16

I can't figure out why this formula is not recalculating. I've even called sObject.RecalculateFormulas and set up a debug log to see what's happening. The field in particular is ...
1
vote
1answer
27 views

Formula that returns a user's manager

I need a formula that return’s a user’s manager from the user’s profile page in a custom field on the opportunity split object. I’m sure this is a simple formula, but I don’t know how to write it.
0
votes
1answer
25 views

Extract year from date field

I have a custom field with date type. I want to use just the year from this date field for a calculation. I want to use to update a field value. I am unable to get only the year from the date field. I ...
4
votes
1answer
96 views

Formula calculating calendar weeks (2015 vs 2016)

I've been using a formula to calculate the calendar weeks. Unfortunately it doesn't work for 2016, since 2015 had 53 calendar weeks. The results for 2016 are one higher than expected. Any ...
0
votes
0answers
31 views

Formula for data/time is off one hour in one instance and works fine in another instance

The formula taking two date/time fields and calculating the number of days, number of hours, and number of minutes. It is one hour off in QA instance and works fine in Dev instance. I could not figure ...
0
votes
1answer
22 views

Lookup Filter with related fields that are more than one relationship away from the lookup object

I want to add a lookup filter for the lookup between Package Version and Release. So I just can choose Releases which are linked to the same Program as my related Package. This is not possible ...
0
votes
1answer
25 views

Creating an If -> then statement for a formula field (long list)

We have a list of 30 countries with specific rates at which our company must withhold taxes, and we wish to create a formula field in Salesforce to automatically compute the rate based on the user's ...
0
votes
1answer
25 views

Formula field not calculating properly with null

We have a formula field in a custom object that does not calculate properly. Although the value of the field in the if condition is not null, the result is always zero. The formula is: ...
3
votes
3answers
248 views

Formula that returns the current day of the week

In Salesforce Trailhead there is one Challenge available. Please find the challenge description below To complete this challenge, use some of the strategies and function you learned in this unit to ...
0
votes
0answers
30 views

how to calculate difference between two DateTime Fields using formula in Process Builder

I want to calculate the Datetime difference between two field and assign to a variable using process Builder.How to do this any thoughts.
1
vote
2answers
21 views

can't able to find Error: Syntax error below code

IF ( ISNEW() Garage__r.Total_inventory__c < Unit_Solds__c, IF (Unit_Solds__c< PRIORVALUE(Unit_Solds__c),false, Garage__r.Total_inventory__c<(Unit_Solds__c-PRIORVALUE(Unit_Solds__c))))
1
vote
1answer
26 views

Number of the Year's week formula stopped working

I had a nice formula that was counting the week of the year, but as we approach the end of year it has stopped working. It now shows "1" in December. Sample versions: CEILING((( Date__c - ...
7
votes
1answer
79 views

More concise syntax

I'm trying to develop a scoring system for a survey and am having trouble making the syntax as parsimonious as possible in order to stay under the character limits when I start compiling formulas. ...
0
votes
1answer
41 views

How to update first name and last name text fields into name field and picklist values into another field

Hi All, I have a requirement where I want to update values from 1. B_Caller First Name and B_Caller Last name(both text datatype) into Name field (Name datatype) 2.Best Call Back Time-Caller ...
1
vote
2answers
30 views

How To Increment Datetime by Decimal?

I have a packaged application installed in my salesforce which sends the Service Duration (Number Data Type) = 3,600.00 and another field Scheduled Date Time 12/21/2015 2:00 PM (DateTime Field Type). ...
1
vote
0answers
24 views

Get Current URL in Formula Field

I have a formula field that looks something like below: HYPERLINK( "/apex/RelationshipManagement?id=" & Id, IMAGE( ...
3
votes
2answers
32 views

Formula Fields Error: Incorrect parameter type for function 'ISPICKVAL()'. Expected Text Literal, received Text

I'm trying to compare if the picklist's value is equal to current year. I tried several approaches but no success. ISPICKVAL(Last_Filing_Year__c,""&TEXT(YEAR(TODAY()))) ...
3
votes
1answer
27 views

Workflow rule formula help - Two picklist values cannot be populated together

I'm trying to create a workflow rule that fires when: Status = New Type = Incident Origin is not Production Monitoring or Proactive outreach AND Does not have BOTH of these picklist values A. Origin ...
3
votes
1answer
18 views

End of the year date formula

Need some help with a formula. I have a start date field that the users have to fill out ( ex. 10.05.2015 ) but i need a date field to automatic fill out an End of the year date. It would always be ...
0
votes
0answers
25 views

how to write formula for number of days spent on each stage in opportunity

Number of days an Opportunity spent in ecah stage and I'm currently using Professional edition also don't want to upgrade to Enterprise edition, Plz help me outof this.
0
votes
1answer
35 views

how to write a formula based on quantity field

i have an requirement , i have field like quantity it is number field and i have a field like batch number it is text field , and i have written a validation rule on batchnumber with regex function ...
0
votes
1answer
31 views

How to compare date

I need to create a workflow in which I need to compare: If created date is greater than 1st december 2015, then workflow rule must fire. I am unable to achieve it. Can anybody please help.
0
votes
0answers
17 views

Display an image by using the DeveloperName

Is there a way to use the HYPERLINK and IMAGE functions to render an image by querying the uniquename of the file as oppose to having to hardcode the file id thereby not looking like this... IF(field ...
1
vote
0answers
20 views

Converting American Date format to a Date Using a Formula

I'm converting an American Date format string to a Date using the following Formula. For example, this will convert a String like "9/25/2015" to an actual Date field that can be used in reports, list ...
0
votes
0answers
15 views

how to case arrival by hour basis on apex chart

Is there a way to plot the Cases by arrival time on hour basis and plot them on a chart.Say when I run a query on Case object where Createddate is from 10/01/2015 to 26/11/2015. I want to know the ...
1
vote
1answer
29 views

How to create Lead Owner change Workflow formula?

I'd like to create a formula that when a Lead's Ownership is either a specific person(s) or a Queue, and it changes, the workflow rule fires. I have tried the below formula with no success. It says I ...
1
vote
1answer
23 views

Field Dependencies & Formulas

I have got two picklists with Field Dependencies: "CODE" & "TEXT" e.g. (Code = A99) --> (Text = "Diodes") I like to have an automatism field filling, when a value in CODE is picked the field TEXT ...
1
vote
2answers
43 views

Getting out Queue Name through Case Owner

I have been asked to fill a custom field named "Group" with the Case's Owner Queue Name. I have created a formula field like this CASE( Owner:Queue.Id, '00Gw0000002RvtS', "Gruppo A - ...
0
votes
1answer
29 views

How can i get decimal place upto 4

Below is my code which is giving me decimal places upto 2. But I want to get decimal upto 4. Please help IF( Final_Amount_with_exch_rate__c>= 1000000, ...
0
votes
1answer
18 views

Is there a way to display Task LastModifiedBy in a custom object list view?

I have a need to display the date and time of the last logged call on a given account in a list view. It can't be done directly as far as I know, so my thinking was to create a field on the custom ...
0
votes
2answers
35 views

Formula to put a date together seperatly Fields “Month” and “Year”?

In an custom Oject, that is filled with external market development data I got a picklist field "Month" (Picklist: 1,2,3,4...12) and a picklist field "Year" (picklist: 1990, 1991, 1992... 2020). Each ...
0
votes
0answers
23 views

How to connect several “IF” formulas together? [duplicate]

I have got 5 fields each filled by a CASE formula related to the same picklist field; unfortunately the formula was to Long to have it in one field! Only one of the 5 fields could have a value, the ...
0
votes
1answer
35 views

Problem in adding a new line character in TextArea field using a formula

I have a Text Area field, which I am updating using a formula from Process Builder. I want to add a new line and tried to do so using '\n' and '\r\n' but none of these work. Here is the formula ...
0
votes
0answers
31 views

Temporary variables in formulas

I need to calculate rating for custom field having datatype Formula,It's value depend on three other field values and need to calculate value on the basis of rule. For this I need Temporary variables ...
0
votes
1answer
19 views

Formula to get “Date” based on Activity History Subject

Since Activity History combines everything such as Calls, Marketo, Email, Etc. In CONTACTS. I am looking for a formula that will get the last activity date based on the subject that contains "Email" ...
2
votes
1answer
64 views

How to check if field is of formula type or not in dynamic apex? [duplicate]

public static void getFieldNames(String objName){ Map <String, Schema.SObjectField> fieldMap = Schema.getGlobalDescribe() .get(objName).getDescribe().fields.getMap(); ...
0
votes
0answers
16 views

Image Based APIs to use in Formulas

Salesforce Formulas can display images -- on the page layout, in a list view, and in a report. We often build image formulas to display an image of the record type or the record status. Lately, I've ...
1
vote
1answer
36 views

When using a formula in a custom field how can I tell if I'm in a sandbox or production?

I have a custom field that I store a url in. If we are in a sandbox I need it to point to an external QA server. If we are in production I want it to point to our production server. I'm looking ...
0
votes
1answer
44 views

how to determine a Geolocation is within radius distance from another Geolocation?

I have two location fields of type Geolocation named point1 and point2. I have one radius field of type Number(6,2). i need to determine whether point2 is located within radius distance from point1 or ...
0
votes
2answers
26 views

How to check a record is a new record or already created one

I'm unable to figure out on how to add "NOT(ISNEW)" and "AND" to my validation rule which is OR(OR(Auditee__r.VanaHCM__User__c <> $User.Id , Auditee_2__r.VanaHCM__User__c <> $User.Id), ...
0
votes
0answers
148 views

ISCLONE() and Workflow Rules against CLONED records

I am trying to create some business logic that resets a cloned Opportunity check-box field to FALSE if that Opportunity record is cloned (our sales team will clone opportunities with the same accounts ...
0
votes
0answers
15 views

Text color on phone field?

Can phone field be color coded? For example, I am building a custom object that has a phone field but having color code to determine that the number is a bad number so I select a radio button and it ...
0
votes
1answer
58 views

Validation Rule for a Currency Field: Field not be blank and the value must be greater than 0

I'm a administrator with basic knowledge on formulas for validation rules. I need a validation rule for a field (currency), this field must be greater or equal to zero and must be not blank. Can you ...
0
votes
0answers
30 views

Convert Date to Datetime Formula

I need to convert the following formula to DateTime based. Can you assist? IF(C1_Date__c = TODAY()-1, 1, 0) + IF(C2_Date__c = TODAY()-1, 1, 0) + IF(C3_Date__c = TODAY()-1, 1, 0) + IF(C4_Date__c = ...
1
vote
1answer
26 views

Formula for workflow rule using a date function and User comparison isn't triggering

My requirement is that a workflow rule should fire and send email to the concerned people. But my workflow rule doesn't fire nor send any email when I use a specific formula which compares a date ...