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
2answers
25 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
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 ...
2
votes
1answer
42 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
166 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
33 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
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
16 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
42 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
38 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
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
2answers
31 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
23 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
32 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
55 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
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
0answers
46 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
20 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
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
37 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
20 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
40 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
13 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
112 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
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?
0
votes
0answers
14 views

Can Name be a predefined field on quick action?

I'm just now realizing the absolute power of quick actions, and I've created one, but am looking to see if something is possible. I'm looking at using some sort of automation to fill in the name of ...
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
26 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
30 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
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 ...
1
vote
0answers
23 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
33 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
33 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 ...
1
vote
1answer
39 views

Prepopulating Time field in Lightning Quick Action: user time zone not respected

I am building a Lightning Quick Action for an object that includes a field of type Time. I would like to prepopulate that Time field with the current time, while allowing the user to make changes. ...
0
votes
1answer
25 views

Time-based WFR or Trigger?

I'm looking to create a follow-up Task record if a Case has been in certain status for a certain period of time. Essentially like this: (Picklist) Case Status: X (Date) Case Status Update : 01/...
0
votes
1answer
37 views

How to create a version formula?

I need some help with a version formula. I have 2 types of formula Version_ID (This number express the id of the Custom_object__c) Progression_Version (This number express the progression of the ...
2
votes
1answer
177 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 ...
1
vote
1answer
55 views

Unable to detect the System Admin in a validation rule error condition formula

I have a business scenario where I would like to restrict the transition to the Accepted status of the Quote object, only to the admin. For this I configured a validation rule with the following ...
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 ...
1
vote
1answer
34 views

Salesforce version of vlookup - returning counties based on zip code

What I want to do seems fairly programatically easy. I could do it in Excel with a vlookup in less time than it would take me to complete this post. I want users to be able to enter the zip code in ...
0
votes
1answer
37 views

Help with Validation Rule for record block

AND( NOT(Star_Job_Project__c ='Technology Product Sales')) This validation rule is on Time Entry Object in which if STAR Job API - Star_Job_Project__c is equal to Technology Product Sales then that ...
1
vote
1answer
25 views

How to autocompile a picklist?

I would like to know if it's possible to autocompile a picklist field with a value of different picklist on others object. In this case, I created a picklist with a name: Campo Prova Picklist ...
0
votes
1answer
24 views

Having an issue with a SF formula validation against a revenue schedule

I have a custom object that is essentially pulling in a calculated amount based on the schedule date , and then after 5 months, just pulls in the schedule amount. This works like a charm if the ...
0
votes
1answer
21 views

Multiple IF conditions on two fields ( one custom field and one pick list field) for a formula field, but getting error

IF( AND( High_Profile__c = "True" ,ISPICKVAL(Priority,"P1")), "Msg1", IF( AND( High_Profile__c = "True" ,NOT (ISPICKVAL(Priority,"P1"))), "Msg2" , IF( High_Profile__c = "False" , "No"))) Error: ...
0
votes
1answer
31 views

Business day formula help

The use case: I am trying to calculate a date that is 3 "Bank Business days" after the application create date. Which includes Saturday and not Sunday. The Below Formula is taking into consideration ...
0
votes
2answers
24 views

How do I get a formula with a Date/Time data type?

The formula expression is invalid: Formula result is data type (Date), incompatible with expected data type (Date/Time). I tried TODAY()