Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
0answers
18 views

Need to reconfigure Process builder formula

Person Accounts is enabled Have multiple record types on Accounts (a few for 'Accounts' and a few for 'Person Accounts' They have an old process that was implemented, but we re-architected the ...
0
votes
0answers
20 views

Date Formula Field

I am tryging to solve for following: Update revalidation Due date (formula field) which on Enrollment object based on risk score field of provider object (contact), risk score field of Org object (...
2
votes
1answer
22 views

Prepopulate user lookup fields with current user, with additional criterias

I have a custom object that we use to log client visits, where both a Sales Rep & a Support Engineer can take part. I have 2 custom lookup fields on this object, one is called "Sales Rep", while ...
0
votes
1answer
23 views

Supported Encryption Operators/Functions

I have been looking into supported operators and functions within Salesforce, and found this list: Supported Operators, Functions, and Actions Supported operators and functions: & and + (...
0
votes
2answers
35 views

The formula expression is invalid: Syntax error. Missing ')' Help Please

When trying to save the below formula I get this error: The formula expression is invalid: Syntax error. Missing ')' Help Please Why do I get this error? How can I fix it? AND( IF ( ...
0
votes
1answer
45 views

DateTime field value in Text formula

I have a DateTime field which shows proper time on UI, I know behind the scene it is GMT format. However I would like to populate same format as it displays on UI in a text field along with some text.
1
vote
1answer
20 views

Case syntax question

Having issues with the following Case function. I'm getting an error in Process Builder: "The formula expression is invalid: Syntax error. Missing ')' . I can't seem to figure out what I'm missing. I'...
0
votes
0answers
21 views

Workflow formula — Simple or double quote?

I've a collegue who is asking me what difference one has to the other, I have to admit I don't have an exact answer.. What is best practise in this case ? Which one do you choose, and why ?
1
vote
1answer
15 views

Get the Hour from a date time field with the current time zone in a formula field

I create a custom field to display the hour and the minute of a date time field. The format I need is HH:MM For now, I get the hour in GMT but it is wrong because I am in France and the time zone ...
0
votes
1answer
31 views

field update in report not getting updated [closed]

I have an object, let's call it Object2. Object2 has a field called Account which is a lookup. Account has a field called customer type. Object2 has a formula field which gets populated by Account....
0
votes
0answers
10 views

Parentgroupval formula for bucked values in a matrix report

I have a matrix report using parentgroupval in a percent field and bucketed values as rows. The formula is as follows: This is incorrect. What I need is to show for each status, the % of that ...
1
vote
2answers
176 views

SYNTAX ERROR “)” ON DATE RANGE

I'm trying to segregate records by month name for the first three months of the year. Everything with a date range of 1/1/19 through 1/31/19, should return JAN, for example. I'm getting syntax ...
0
votes
0answers
17 views

How to Set the value of a picklist with a formula? Possible?

We have a process which creates Contacts when new Applications are submitted (co, Applications__c). The new Contact has a lookup back to Applications (co, Applications__c). There is a field on ...
0
votes
1answer
30 views

ISCHANGED and PRIORVALUE formula creating error in PB

I have a request to track some metrics within a case. Building a case history report isn't my solution as they take too long to run and the criteria is too specific. What I'm wanting to do is ...
0
votes
1answer
59 views

The formula expression is invalid: Syntax error. Found ')'

I feel like I'm way off but trying to setup a critiera in process builder that determines if the year 2018 from the picklist Year is selected, and the Call Total field has been modified and the record'...
0
votes
1answer
17 views

How to use an external API in formula field

I'm trying to create a formula field wich use an external API in one of my object. I'm trying to GET the number of followers of an instagram account directly in the formula field. To do that, I ...
0
votes
1answer
18 views

How to extract date value from a text field with inconsistent values

I have a field called Invoice_Sent_Date_Text__c that has values like: Sent [11/30/2018] Billed as Package; Sent [1/28/19] Sent [3/6/19] 3/6/19 I need to create a field that will isolate and ...
1
vote
0answers
14 views

Can some explain below formula of excluding weekends counting

Can some explain below formula of excluding weekends counting, I want the explanation I'm not able to understand the below formula. The formula is : CASE(MOD( ActivityDate - DATE(1985,6,24),7), ...
0
votes
1answer
27 views

formula compiles in PB sandbox but not in production

I have a formula field in a PB as the criteria to update a field. It works fine in sandbox but in Prod I get an error. The PB should update the case if the Type changes from the L3 value.
0
votes
2answers
18 views

Lead Formula for sending an email when converted

I created a process builder flow that will send an email when a lead is converted in lightning. I created a hidden formula on the lead field that pulls in all the ConvertedID's in one field and I ...
1
vote
0answers
20 views

Is it possible to calculate the difference between 2 Time Fields with Formula?

I am trying to calculate the difference between 2 Time-fields with a FORMULA . (So no DateTime) I know it is possible in Apex, but I am wondering if it is possible in a Formula as well. I tried a lot ...
2
votes
1answer
23 views

In process builder, how do I write a formula to set a relative day but a specific time?

In this example, let's say a new account is created and we want to have a kickoff lunch with that new account. I'm setting up my logic in process builder using a Start Date Time set to... ...
0
votes
1answer
17 views

Is there any way to force an update to systemmodstamp based on a formula/rollup value changing if the record itself wasn't modified?

If I have modified a formula or rollup field such that the returned values change on a given record, it doesn't update the record's systemmodstamp, since the record itself hasn't been edited. Is ...
0
votes
0answers
20 views

Time Spent field has negative value even if Start Time field value is less than End Time (Only happening for few records, working fine for the rest)

I have three fields - Start_Time__c(Date/Time), End_Time__c(Date/Time), Time_Spent__c(Formula(Number)). The field Time_Spent__c calculates time difference of Start_Time__c and End_Time__c in hours (...
0
votes
1answer
20 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 ...
0
votes
1answer
15 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
23 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
34 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
15 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
1answer
17 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
28 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
42 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
29 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
28 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
35 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
42 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
34 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
81 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
508 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
39 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
35 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

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
45 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
46 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
62 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
54 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
71 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(...