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]

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 Validation Rules and criteria for Workflow Rules and Approval Processes.

0
votes
1answer
15 views

How to add a Formula value based on Comments at the task level

I want to create a Formula that takes some of the text values from the field 'Comments' in a Task. The issue here is that you can only create the field at the Activity Level. When creating the ...
-1
votes
0answers
13 views

how to find this date from being greater than 14 days from the Broadcast Start Date [closed]

Broadcast Stop Date: The latest date in which the XYZ customer wants the Commercial to be broadcast. This field defaults to 14 days from the current date on new Commercial records. A Validation Rule ...
0
votes
1answer
11 views

Are two blank fields considered equal in a Salesforce formula?

Writing a Salesforce formula and my if statement is comparing whether two fields are equal to one another (ie. Field1 == Field2). However it appears to evaluate them as false if both the fields are ...
0
votes
1answer
16 views

Salesforce matrix report

Hi I am trying to create a salesforce report to show the 3 columns Contact owner number of contacts per owner whether contacts have any activity on them or not(sum of relation) My report looks ...
0
votes
2answers
22 views

Converting a date field to date time in formula

I have a requirement to convert a date field to date time and the time should always display 00:00 AM. I tried the below formula DATETIMEVALUE(Text(Created_date__c)&" "& "00:00:00") where ...
0
votes
0answers
17 views

Process Builder Date Time Formula Help Please

I'm build a Process Builder Criteria that needs to say: if X Field = Error && AT 3AM TODAY then Execute Action. I'm not sure how to do 3AM Today. Thanks
0
votes
0answers
28 views

Lightning Experience Formula Field With Old Value

I've "A" object with two fields: a lookup field (object B) and a formula field (field status of object b) and a "B" object with lookup field to "A" object. In lightning experience I open record "A" ...
0
votes
0answers
10 views

Formula field in a Predefined Field Value (Email)

I have a record, namely Quote, which has a lookup relationship with Contact. Now, I'm creating an Email tab under the Activity, and I want the fields (To, From, Subject, etc..) to be auto-populated. ...
0
votes
0answers
13 views

What is wrong with my Date/time Process Builder Formula based on a Date field without weekends

I have a Task Process Builder based on Opportunity Stages. I am trying to create a formula for the date time due field based on a date field (Internal Deadline). I need the formula for the Date Time ...
0
votes
1answer
26 views

Error in return type

I have written a formula field of data type DATETIME and return type text IF((ISPICKVAL(Status, 'Completed')),NOW(),'') but error occurred states Error: Incorrect parameter type for function '...
1
vote
1answer
35 views

Formula field to calculate the percentage of days remaining

I have a custom formula field where I need to calculate the amount of days in the year * 100 \ 365 = % of days remaining. I've created the following formula: ROUND((365 - (CloseDate - DATE(YEAR(...
0
votes
1answer
27 views

Getting 'Error: Syntax error. Missing ')'' in formula but can't find where

I am writing a formula that will execute a workflow action to change an ownership of an opportunity to the database. However, if the user making the change on the opportunity is one of three profiles ...
0
votes
1answer
25 views

Does Salesforce or any third party maintain a list of which formulas work in list views?

I am looking for a list of formulas that work in list views. For example, you can set "last login" = LAST QUARTER on the user list view, which is very helpful for generating a list of users who have ...
0
votes
0answers
12 views

calculate a product price on an opportunity line based on values from the account

I am trying to calculate a product price on an opportunity line based on values from the account object that the opportunity is linked to. My ultimate aim is when selecting a product to add to the ...
0
votes
0answers
23 views

Populate date fields on multiple records using a formula?

So we have a custom object called 'Sessions' (child). Sessions are automatically created via a trigger for a 'Course' (parent). Now depending on the value of the 'Level' field (on the Course) object, ...
0
votes
2answers
31 views

Determine if WhoId is for lead in formula field

I created a number formula field that looks at the WhoId of the activity and the goal was to determine if the value was a lead or a contact so that I can do reporting on it. This is the formula I am ...
0
votes
1answer
31 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 ...
2
votes
1answer
58 views

Non-http url link from HYPERLINK('notes://example.com', 'View') is not opening

We have a text formula field with following code: HYPERLINK("notes://example.com", "View") When using Lightning Experience, thin link is not redirecting to address. In Classic Experience new tab is ...
0
votes
1answer
460 views

Getting an error while using formula evaluates to true in process builder

I am using the below formula to evaluates to true to run the process builder the formula should evaluate to true on insert operation if the Seminar_Status__c == RSVP and on update it should be true ...
1
vote
1answer
37 views

Calculate Days Prior and Return a Date?

I have a custom date field called "payment_due_date__c" and a formula field called "reminder_date__c". I want to display a date in the reminder date field equal to 5 business days prior (not ...
1
vote
1answer
34 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
18 views

Why is DATETIMEVALUE Rolling back one day?

I have a DateTime Field that seems to me to be behaving incorrectly. I am 8 (PST) hours off GMT. If I put in the formula field: DATETIMEVALUE("2018-01-04 01:00:00") I will get: 1/3/2018 5:00PM ...
0
votes
2answers
44 views

TIMENOW() subtraction

I am trying to find out the difference between the current time and 5PM. I tried numerous variations and I just can't make sense of the results I am getting. Lets say current time is 15:36 (3:34 PM) ...
0
votes
1answer
40 views

Feb 29th error on formula for datetime field

I have a formula that is throwing up the 29th feb leap year error etc but for the life I cant see why? The error message is "Computed an invalid date, such as February 29th on a non-leap year. ...
2
votes
2answers
38 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
2answers
42 views

How to calculate present value (PV) in formula

I have a formula (see below) which works in Excel and uses the -PV function (in bold). The PV function calculates the present value of a loan based on certain criteria. However, Salesforce doesn't ...
1
vote
1answer
30 views

Salesforce Report for - Last to last month

I am creating a salesforce report for the last 3 months(Oct, Nov and Dec). Ex - To retrieve this month data(DEC) I applied - THIS MONTHS filter in Date Field for the field Expiry_date, For Last month(...
0
votes
1answer
55 views

Validation rule get all picklist values

How can I get all picklist values in a validation rule? I'm looking for a suitable function but I cannot find any. What I need to achieve is that some string is among the picklist values. Please ...
0
votes
2answers
18 views

RIGHT function to get the last three characters

I'm using the following formula in a validation rule: IF(ISPICKVAL(Level_Name__c ,"Level"), IF(CONTAINS(Name,"ONE")|| CONTAINS(Name,"TWO") ,TRUE, FALSE), FALSE) How can I get the last three ...
1
vote
1answer
101 views

Issue - Picklist fields are only supported in certain functions

I am working around salesforce's formula field in Process Builder, to compare two fields values. For instance, the field Contact_A__c and Contact_B__c are picklist field types. I am attempting to ...
0
votes
0answers
52 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
0answers
51 views

Computed an invalid date, such as February 29th in Salesforce,

I have a workflow rule in place that updates ReminderDateTime when from another custom DateTime field which is a formula field on the same object. But eventually when i tried complete a task, i am ...
0
votes
1answer
24 views

roll up summary involving a formula field in another object

The client has a field in the Account, which is a roll up summary (sum) of a formula column in Opportunity. Let's call the formula field in Opportunity oppFormulaField. The formula field is not ...
1
vote
1answer
54 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
38 views

CASE function setting wrong values

We have a CASE() function on a Field Update for which the Workflow criteria is Custom_Field1__c NOT EQUAL TO null then Update another Custom_Field2__c using below formula: CASE(Custom_Field3__c, ...
1
vote
0answers
22 views

Subscribed report doesn't display images

I've got a report with a custom field (Task Due Status) that displays a red/yellow/green flag based on Due Date. Report display perfectly when viewed in Salesforce. When I 'Subscribe' to the report, ...
0
votes
2answers
54 views

ERROR = Error: Field Product__c is a picklist field. Picklist fields are only supported in certain functions

Getting the above error. Took the advice of using ISPICKVAL function in my formula (below). Product__c<>ISPICKVAL(Account.Product__c) Still returning the above error.
0
votes
1answer
15 views

Error message not displaying in validation rule

I created a validation rule on Date field in which I want today date or future date only and also it should not blank. This is my code: AND( BFL_Date__c >= TODAY(), ISBLANK( BFL_Date__c ) ) I ...
2
votes
1answer
209 views

Validation rule - created date < FIXED DATE

I'm trying to add a line to a set of existing validation rules so they only apply to opportunities created prior to a fixed date. Let's say 10/31/2018. I thought it would be pretty straightforward as ...
3
votes
1answer
54 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?
0
votes
1answer
9 views

Is it possible to get a value with a formulafield fro product to Order Product

I have a external id value on product which I want to put on the Order Product object. Is this possible with a formula field?
1
vote
0answers
29 views

Is there a Salesforce formula playground website / service / tool

I'm interested in using a Salesforce formula playground similar to: JS Bin - JavaScript Debugger JS Fiddle I've had a Google and cannot find anything. Does anyone know of a tool/website/service ...
0
votes
1answer
13 views

Field Update using a formula to render a date that is 14 business days after the close won date

I am creating a process builder to field update a date field (Requested Start Date) that should be 14 business days after the Close Date. The field I'm updating is a date field and so is the field I'm ...
1
vote
1answer
38 views

ISCHANGED(ISPICKVAL() formula

I have a process builder in place for when an opp is in Discovery stage and Type is not Rollover to send an alert and if it is a rollover in discovery to send a different alert. Every time the opp is ...
0
votes
1answer
26 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 ...
1
vote
0answers
25 views

ISCHANGED trigger in PB

There is some weird behavior going on with a fairly basic Process Builder setup. There are 5 (working) nodes that only react on Case Status update and are set to be executed only when the specific ...
-1
votes
1answer
35 views

workflow and time based workflow help

Is there a way to assign a timebased workflow for the following? I have 2 fields, reminder__c, and registration_date__c. If my reminder__c is blank for 14days or more after my registration_date__c, i ...
0
votes
1answer
37 views

How can I get the last value from my picklist? It removes my “1”. Work with TRIM

I have a few values: 5T-7T 7T-12T 12T-22T 22T-145T I use that formula to get my last value: TRIM(RIGHT(TEXT(Items__c), FIND("-", TEXT(Items__c))-1)) It works but when my second value starts at "1",...
0
votes
1answer
25 views

Summary from 5 pick lists

I have 5 pick lists, each pick list is a review and i need to have an average rating from all the selected pick list values. The pick list values have strings and i need to give average rating as ...