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.

0
votes
1answer
22 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
13 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
26 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
0answers
35 views

I can't find syntax error in formula [closed]

=IF(I7=1000, [B7*I8], IF(I7=500, [B6*I8], IF(I7=300, [B8*I8], [0]))) I want to calculate differently according to the value in I7. It says "syntax of ...
0
votes
2answers
21 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
20 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
24 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
26 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
37 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
97 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
21 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
26 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
26 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
votes
0answers
11 views

Create current location automatic without coding

I just created customer object with customer name field ,now i want the latitude and longitude to auto update when customer name is update HOW? (is it possible without the coding)
1
vote
2answers
42 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
18 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 &...
0
votes
3answers
44 views

IF Formula on Opportunity Date

I'm sure this is ridiculously simple. I'm trying to put Opportunities into groups based on Age This is the formula I've written IF(Opportunity_Age__c < 100, "Short Term", IF( OR( ...
1
vote
1answer
21 views

Currency or Number in Process Builder formula

Getting an error when trying to display the currency or value of a field using the formula in Process builder. I need this to work for a callout. Error Your changes are saved, but you can't ...
1
vote
0answers
12 views

Flow, multi select checkbox and email action

Good morning Since I have no coding background, visual flow is a must for me (At least for now) and for some time now I try to understand the tool, its functions and limitations and what better ...
0
votes
0answers
11 views

Annual revenue filters in the report

I'm trying to calculate the gross annual revenue for the last year. But my filters seem wrong to me. I consider the interval between starting and final dates. But what if the date started in 2017, and ...
0
votes
1answer
47 views

Formula field doesn't retain old values in the trigger

I have scenario 1 - A formula field on Account (custom_type__c) which references the Contact's email as - Primary_Contact__r.Email Whenever Primary Contact's email id is changed , Custom Type is ...
0
votes
0answers
40 views

Days in this month and days in this year formulas

I have a formulas of days in this month and this year with start and finish dates. My formula counts the number of days in this month/year that fall in a given interval (between Start Date and Close ...
0
votes
0answers
11 views

Formulating quantity remaining from quantity sold and quantity used (on a custom object)

I am trying to formulate the quantity remaining from product sold quantity (opp line item) minus quantity used, which is a field on a custom object that is related to the opportunity. I tried creating ...
-2
votes
2answers
56 views

How can I simplify the formula to avoid limit?

I'm getting "Maximum size is 5,000 characters" for formula, when trying to do this: ((Account.Cost_per_day__c + IF( (AND(Cleaning__c = TRUE, Parking__c = TRUE)), (VALUE(TEXT(Number_of_cleaning__c)...
0
votes
0answers
20 views

How to get the Price book price of the Product to a custom field (formula)?

I want to create a Formula Field in the Object Product2 that will store the List Price of the Product stored in the Standard Price Book. How can I do that ? In the Formula I can't reference the Price ...
1
vote
2answers
173 views

The number of days until the end of the month

For example, I have Start Date 29.05.2019, and Finish Date 4.06.2019. I have a formula field which displays 6 days between these 2 dates. But how can I count the number of days from Start Date until ...
2
votes
1answer
90 views

Validation rule Scheduled Apex

I have a scheduled apex job which updates a field which is controlled by a validation rule as follows: AND( Not(ISNEW()), $Profile.Name != "System Administrator", ISCHANGED(...
0
votes
1answer
10 views

Find week number of the month from today() date using formula field in salesforce

I want to Find week number of the month from today() date using formula field in salesforce. On developer forum sites, I am getting the formula for week number of year but My requirement is to find ...
0
votes
1answer
21 views

Formula to capture 5 letters on contact name

I was wondering if it is possible to capture 5 letters off of a contacts full name based on its sequence? for example: eg. Surname Jolie-Pitt, First Name An gie Result: OLENG Non-alphabetic ...
0
votes
1answer
38 views

Incorporate Record type name on validation rule formula

I am trying to create a formula that restricts multiple checkboxes from being ticked. User should only be able to tick one checkbox per record. I've managed to create the formula that handles this ...
0
votes
0answers
23 views

Parsing text field on left and right

I have task names (in a field on Krow Task called Name) that look like this: "XYZ - Business Requirements Summary". I need to parse this field out so that it only shows "Business Requirements" in a ...
2
votes
2answers
192 views

Error: Syntax error. Missing ')' for CASE Statement

I've created a text formula field, but I've been hitting a wall with the CASE portion of the formula: I keep getting the "Error: Syntax error. Missing ')'" message. Here's what I created: Account....
0
votes
1answer
17 views

comparing DateTime value in formula

I am trying to create a formula field to set a DateTime value, but it fails with the following error: Error: Incorrect parameter type for function 'IF()'. Expected Number, received DateTime The ...
1
vote
0answers
32 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
27 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
25 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
26 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
67 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
51 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
21 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
19 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
11 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
178 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 ...