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.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Help with Formula

I am getting a 'syntax error' error message when attempting to use this formula as part of a workflow rule criteria. I have double-checked the field names are all correct. Can you tell me where I ...
0
votes
0answers
24 views

How to Use Formula Field to Log Out and then Open a URL?

Background I'm trying to set up a Formula (Text) field with the HYPERLINK function to log a user out of their session and then open an external URL: HYPERLINK("/secur/logout.jsp?retURL=www.google....
-3
votes
3answers
34 views

How to get the Latest record created date in salesforce?

I have a field called "Date" on custom object "TestData__c". If I create a record today I need to display today date.If I create a record tomorrow I need to display Tomorrow date.How Can I achieve ...
1
vote
1answer
17 views

Process Builder - Formula Execution

I'm attempting to use process builder to execute the following formula to average a set of picklists (ran into limit with formula field). I'm getting an error that Field Mission_Aligned__c does not ...
0
votes
1answer
11 views

Regex for Text Field in Flow screen input validation gives error

REGEX( {!Phone} , "((^[?+\+\s]|^[\d]?)([\s\-\.]?)([\d]{1,3})([\s\-\.\(]*)([\d]{3})([\s\-\.\)]*)([\d]{3})([\s\-\.]*)([\d]{4})$)" ) Phone (Screen Component) - The formula expression is invalid: ...
0
votes
0answers
30 views

Help with formula field:

Below formula count 1 when statement is true and count 0 when statement is false. I am using this formula to calculate bad data populated being populated in lead object. Output of this formula is ...
0
votes
0answers
17 views

Phone (Screen Component) - The formula expression is invalid: Syntax error

I have Text field on Flow Screen component that I use for Phone number. In validate input section i have wrote REGEX({!Phone} , "^(\+(([0-9]){1,2})[-.])?((((([0-9]){2,3})[-.]){1,2}([0-9]{4,10}))|([0-...
1
vote
1answer
19 views

WFR criteria formula And with Nested OR

trying to add and OR syntax into my formula. AND((Name <> Contact__r.LastName + " - " + Term__r.Name), OR(Record_Type_Hidden__c <> "New_Agent",Record_Type_Hidden__c <> "...
0
votes
3answers
51 views

Draft Formula Syntax Error

The purpose of this formula is to assign numeric values to some picklists and average them. This is a second draft which returns syntax error Missing ": ( CASE ( Mission_Aligned__c, "No elements ...
2
votes
2answers
24 views

Formula showing Day Of Week and CreatedDate as a Text String

I am trying to create a formula field that will return the Day of the Week concatenated with the date the record was created. The end result should look like this: Tuesday - 8/13/2019 I have this ...
0
votes
1answer
44 views

How to convert a number field to days hours minutes

I have a number field which is Average Time calculated based on difference between two date fields , i want to convert this number field into Days Hours Minutes , how can we achieve this. I have ...
-2
votes
1answer
24 views

Concatenate Picklists In Formula

I am creating a formula field to concatenate the picklist value with nested if..How can i achieve this as my formula is not working my requirement is IF Pricing Method=[A, B, Firm]…Cost Method='A' ...
0
votes
1answer
36 views

Error: Syntax error. Missing ')' -

I wrote a formula for a field Target per Month per Opportunity owner that should populate with currency when an opportunity has a certain close date month. IF( AND( Owner.Id = 0054J000001U0X4QAK, ...
1
vote
1answer
39 views

Case Formula Syntax Error

Any ideas on why this returns Missing ")"? Thanks! CASE ( Mission_Aligned__c, "No elements aligned",1, "Few elements aligned",2, "Some elements aligned",3, "Most elements aligned",4, "All elements ...
0
votes
0answers
27 views

How can I stop multiple case update notifications being sent?

I've created a PB which notifies the case owner whenever a case they own is updated. The issue is that I have a number of child objects (and processes) which update the case record when an action is ...
0
votes
2answers
36 views

Returning wrong order in SOQL ORDER BY

I'm facing a problem with the SOQL ORDER BY. I'm quering on a custom object with this query SELECT completeTreeSequence__c FROM CPQ_Line__c WHERE CPQ_Header_RU__r.Id = 'a043E000005PfD7QAK' ORDER ...
1
vote
1answer
55 views

formula not calculating correctly

I have a field, Requested Completion Date that needs to be calculated by adding the Length of SOW (Months) to the Requested Start Date and the date that it returns needs to be on a weekday. I have the ...
0
votes
1answer
34 views

Use Picklists in Formulas - Admin Advanced Trailhead Module

Can someone help me with this error? There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on ...
0
votes
1answer
39 views

Formula to Access Network Folder/Files

Im trying to access my local folders using custom Formula'Hyperlink' function This is my formula Test Open = HYPERLINK("file:///" & Path__c ,"Go To"). When I click the link it gives blank ...
1
vote
2answers
44 views

Need help with the Formula Field in Salesforce. I must have not entered the formula properly. Need help

For the purpose of having a prospect list as a report, I would like to show up in the report only leads/contacts in a campaign member list owned by the logged in User AND the leads owned by a queue. ...
0
votes
0answers
19 views

Save previous sibling value in new field

I've got a formula that requires me to use the createddate of the previous entry in a field. I think I've determined in order to do this, I need to create a new field (PriorDate) that records this ...
1
vote
2answers
37 views

Concatenate custom picklist field with number field

'Location' is the field name and is field type = picklist 'Account_ID' is the field name and is field type = number I want to concatenate these two. My formula is TEXT(Location) & "-" & ...
-3
votes
1answer
30 views

Contract End Date Formula

I've been racking my brain for about 8 hours trying to figure out how this formula works, or I guess WHY it works. DATE( Year( Contract_Start_Date__c )+floor((MONTH(Contract_Start_Date__c) + ...
0
votes
2answers
22 views

Help with nested AND/OR for Process Builder criteria node

Keen for some help with this formula please. It's ignoring the PRIORVALUE OR statement so presumably the order of what I'm doing is incorrect even though PB accepts this syntax: AND ( ISCHANGED([...
0
votes
2answers
34 views

Flow loop with formula returning null value

I have a Flow which loops through a collection of custom Objects. In each iteration it gets an exchange rate from custom metadata. I then need to multiply a number in each custom object with the ...
0
votes
1answer
28 views

Issue with null pointer check in process builder

can anyone help out me to in the following formula? I need to put a null check for the opportunity whenever the contract is created and not for edited. I have chosen 'Formula evaluates to true' and ...
0
votes
0answers
48 views

Need help creating a fourth splitter

I have a field that contains 4 values that are comma separated: Value1, value2, value3, value4. I am currently able to dissect the first 3 values but am having trouble getting the fourth one. Here is ...
0
votes
1answer
24 views

Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 4

I keep getting Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 4 Can anyone advise on where its pulling the 4? IF ( $UserRole.Name = "x", IF( AND (Quantity >...
0
votes
1answer
37 views

Process Builder - formula opinion

Have a Process Builder condition that isn't working and I'm unsure if its my formula or if it's another part of the PB that is preventing this from working. This condition is the 4th out of 41 ...
-1
votes
2answers
33 views

Formula utilizing Look Up Field to User not comparing values correctly

The following code results in "", every single time. Even when the Id's match on the record. Why is this? if ( SDR_Owner__r.Id = '0056A000002iMxjQAE', "https://fb.pics/img/2019/05/31/Bruce.png", if( ...
0
votes
0answers
33 views

How to tally a picklist value in Report Formula Builder?

We have a proprietary survey for closed cases where a customer clicks a button and it updates a field on the Case object called One Click Survey. There are four options: "Excellent", "Great", "Ok", ...
0
votes
1answer
25 views

Months between dates in Flow

I am new to Salesforce and need to know how to implement a months between dates fromula. The formula needs to be created in Flow Builder as a formula resource. Most of the examples I looked at refers ...
0
votes
0answers
16 views

Formula Not update the Record Type as I expected

LEFT( [rC_Giving__Planned_Giving__c].Name, FIND( " ", [rC_Giving__Planned_Giving__c].Name, 1 ) ) + [rC_Giving__Planned_Giving__c].RecordType.DeveloperName Hello, I am using this formula to ...
0
votes
1answer
27 views

Does the BEGINS formula work in an HTML Email template?

I have an email template in which I need to display a person's role, but I need to determine whether the role starts with a vowel (eg Accountant) so that I can correctly display 'a' or 'an' before it ...
0
votes
3answers
46 views

Date formula on Process Builder

Hello I am trying to create an entry criteria when an opportunities last activity date is greater than 7 days.. I cannot seem to get the syntax correct. here what I've got so far. today() - ...
0
votes
1answer
24 views

multiselect pick list custom field

I have a long if(includes formula that is aggregating a few common responses into the same text values. (It's longer than below but that is enough for my question). There are actually 3 outcomes I ...
0
votes
1answer
29 views

Date Formula field help

Good Day, Would like to request assistance on a formula. I am trying to capture the Day & Month of a field called Contract_Start_Date__c and then add the year today. For instance Contract Start ...
0
votes
0answers
27 views

SUBSTITUTE Function and renaming Opportunity records based on Account Name Change

I have a naming convention setup for the "Name" field on Account and Opportunity records. Example: ABC Company - 2323293 Using Process Builder, if an Account Name changes, I want to update the ...
0
votes
2answers
40 views

Salesforce - Data Validation - last character must be a letter

I need a data validation formula to say, if status is "Registered" and ID is 6 characters long, the last character of the ID must be a letter. I have managed to get this far but come to a brick wall; ...
-4
votes
1answer
43 views

Updated requirements - Salesforce formula field evaluating several different values/fields and dates [closed]

if field1 (picklist) not equal to value of xxxxx look at field 2 (date) and if blank or greater than today/current date display value of field 3 (names/text) if field 3 is blank display value of field ...
1
vote
1answer
39 views

Can we convert timestamp format

I have one formula field. I am able to remove spaces but needs to convert into below format, Is it possible to handle in formula ? Formula Field : Name & SUBSTITUTE(TEXT(CreatedDate) , " ", "-") ...
1
vote
1answer
32 views

How to use “in” in a formula to avoid Error: Maximum size is 5.000 characters

I'm using a formula thats checks the name of a role and sets true or false a box. The problem is that i'm calling a firld that is already a formula, so i'm getting the compiling error. Instead of ...
1
vote
1answer
100 views

How to Address Daylight Savings Complications when Converting Date to Date/Time?

Note: I've tagged this question with 'Apex' because there doesn't seem to be any other way to resolve it. I'm able to call on an Apex Action in a flow, but I need help with the code. Background My ...
0
votes
1answer
23 views

IF(CONTAINS) question from an MPL

I am trying to aggregate data from an MPL into a separate field with fewer values. When I run the formulas, it is only returning the first value. Is there a way to rewrite the formula so that all true ...
-1
votes
1answer
27 views

Question on Multiselect Picklist

I am trying to assign values to a multiselect picklist which also allows users to input a unique value (lots of values). I would like to create a formula to assign a 1 to all values, and 0 to blank. ...
1
vote
1answer
27 views

Assigning values to blanks in a picklist

I am trying to assign values to all the responses in a picklist including blanks so I can bucket in a report into responded and not responded. My formula is below but I am getting multiple syntax ...
0
votes
0answers
11 views

Lookup Defaults for a Attendance Register

I have created an Services Attendance Register which uses 6 tables: Account – Standard Salesforce Object Service – Lists of Services Service Prices – Acts as the default price for the service between ...
1
vote
2answers
43 views

How to pull an email address from one field into another

I'm wanting to insert the Account 'Email' value in to another field in a Workflow action but am having some trouble getting the formula right. This is what I Have so far.. Workflow rule = `Account: ...
0
votes
0answers
20 views

Maximum field that can be defined in Process Builder condition

We have set of field that we need to detect changes in the object for validation rule, it around 71 (because it getting bigger) and it hit formula character limit. So we move to Process Builder to get ...
2
votes
1answer
30 views

newbie formula question - returning text if one value greater than another and both greater than 0

Trying to create a formula field that returns text "Thank you for increasing your giving." IF npo02__OppAmountThisYearHH__c > npo02__OppAmountLastYear__c AND npo02__OppAmountLastYear__c &...