Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
-1 votes
1 answer
17 views

IF Formula help - Multiple Parameters Issue

Im new to salesforce formulas and need to implement this new field (New_License_Manager_ID__c) into the formula. I received an Error: Incorrect number of parameters for function 'IF()'. Expected 3, ...
user avatar
0 votes
1 answer
17 views

Did something happen with the Month function?

I am trying to create a Row Level Report formula to give me the Opportunity Created Month. Below is a picture of the formula I am using. This has always worked before. Do you all know if something ...
user avatar
-1 votes
0 answers
17 views

Formula to cut the last word [closed]

I have a field Name__c If the value of Name__c is [ Valdez John Lester Cruz ]. I want to cut the last word and need to save it in Last_Name__c and the rest should go into First_Name__c. My logic is to ...
user avatar
  • 13
0 votes
1 answer
21 views

Update a Date field on the record in Flow Builder from the output of a formula date field

I am new to creating formulas in flows, and just starting to learn flows altogether. I am trying to create a record-triggered flow to update an existing Date field on a record based off the output of ...
user avatar
  • 3
-1 votes
1 answer
25 views

Help creating a filter

I want to create a filter that will give me the difference between Close date and Open date. I have no clue where to start.
user avatar
0 votes
0 answers
16 views

Formula to calculate latest date from different orders in a report

Hey guys :) so I'm stuck here... I got a report in salesforce containing an 'Issue Date' field, and it would help me a lot if I had the latest date from different orders... I tried to create a field ...
user avatar
-1 votes
1 answer
24 views

How to convert date/time field to a text field using formula

I have 3 fields on UI Name field1, date time field2, text field3 field3 is a formula field which is concatenation of field1 and field2. field1 + text(field2) if field1 value is Sam D field2 value is ...
user avatar
  • 3
-1 votes
1 answer
22 views

When I would change a formula, then when the value from that formula will change?

I have a hyptothetical formula (in pseudocode): if (XXX_field is empty): return 100 And I will change it to return 200 When should I see changes in that field? (200 instead of 100) Only after ...
user avatar
0 votes
2 answers
34 views

Calculating the start of a new month in SF

So essentially what I'm looking for is to be able to calculate the start of a new month. So for context, there is a checkbox that I want to clear at the start of every new month (if it's ticked ofc). ...
user avatar
-1 votes
1 answer
32 views

Summary Level Formula - Sum Closed/Won Opportunities

I am using Lightning and trying to build a summary level formula field to show the sum of closed/won opps next to the sum of total opportunities for a given time period (fiscal quarter for example). ...
user avatar
0 votes
1 answer
17 views

Tracking number of contact attempts based on Tasks under Contact

I need to update a custom field called Contact Attempts on the Contact sobject with a numerical value equal to the number of all Tasks associated with the Contact. Any time a Task is added or deleted, ...
user avatar
  • 5
0 votes
2 answers
44 views

Formula field date subtraction

I have a formula field as a boolean which should return true if the date of today and enddate has less than 3 months in between and the enddate field is not empty. I dont get the correct results. ...
user avatar
  • 2,068
-1 votes
2 answers
44 views

How to change boolean result to a compatible currency value in a formula field

I got this formula and I got stuck trying to make it work. How do I get the result to be compatible with a currency field? Any help would be greatly appreciated! The error: Formula result is data type ...
user avatar
  • 11
0 votes
1 answer
43 views

Format a date in a Flow?

I used in my flow a custom field of type date which returns to me in the email action a value of the date in the form of month Daye , Yers , what I want is to have the value of the date in the form DD/...
user avatar
0 votes
2 answers
27 views

Formula Help - alternative of using nested if in formula due to size limitation

Can anyone kindly help me with with following salesforce formula I have been trying to write. Formula is getting fairly complex and large due to number of conditions. Basically there are 4 status ...
user avatar
-1 votes
0 answers
22 views

How to parse a datetime value to int in a formula

We have a formula that calculates if a worker has arrived at his job and if he arrives late, indicate the time it took. The problem is that if the worker arrives late, the formula, instead of ...
user avatar
  • 19
0 votes
0 answers
39 views

Formula Help - Fairly complex Advanced Formulas

I am a newbie to creating formula fields and have been tasked with creating about 10 different ones by end of week. I was wondering if anyone could help me or guide me to some good resources, so I can ...
user avatar
0 votes
1 answer
20 views

Return the start of a email domain

I'm looking for a formula to help return the below from an email domain. Email domain: xyzcompany.co.uk Return: "xyzcompany" Formula I have gives me the mid and returns "co." MID(...
user avatar
0 votes
0 answers
14 views

Field changed triggers approval process

I have a requirement where the Amount field when changed and falls within a range should trigger an approval process. The ranges are (10,000 to 40,000) and(40,000 to 80,000). If the record is already ...
user avatar
  • 1
0 votes
0 answers
13 views

Calculate Due Date

I'm calculating the Due Date for a custom record when a record is created. I've got a flow that does the updates but I keep getting an error when I create the formula Error: Syntax error. Missing '=' ...
user avatar
  • 1
0 votes
0 answers
23 views

Reporting Interval Between Two Dates Within Same Column

Thanks for any and all help! This is pretty straight forward but I am failing to execute. It is simple to calculate the difference between two dates if they exist in two columns, however, in this ...
user avatar
0 votes
1 answer
17 views

condition form not Leap Year issues

I want to express this condition with my formula taking into consideration the date of 02/29 End date >= Current date + 365 then green End date between Today's date + 1 and Today's date + 364 then ...
user avatar
0 votes
1 answer
53 views

Account formula field to get the latest opportunity / quote contact name?

An odd request, I know. What I'm looking for is a formula on the Account object that grabs the most recent Contact name that is assigned to an opportunity / quote. Is this possible with a formula or ...
user avatar
  • 211
-3 votes
2 answers
38 views

Weighted Probability

I want to create a formula for Weighted probability for Annual Recurring Revenue (ARR) within salesforce. Unweighted I can simply do: Opportunity.Incremental_ARR__c * PROBABILITY I believe I need an ...
user avatar
0 votes
0 answers
22 views

custom component popup via hyperlink using formula field on standard detail page

We have a hyperlink formula field on Case record page. Upon clicking of this, user is navigated to a page where we have embedded a canvas app. Business requires to have a Warning message when user is ...
user avatar
  • 2,551
0 votes
2 answers
73 views

How do I remove all text and characters from a Text field except 0 - 9

I have a Custom Mobile Phone field where we only want to see numeric characters Is there a way to remove all text except 0 through 9? I have a Substitute formula that removes (, ), -, _ etc but we ...
user avatar
0 votes
1 answer
37 views

How to resolve extra margin added in formula field with multiple images?

Here's a sample formula field called Icons IMAGE("/img/samples/color_red.gif", "Red",20,20) + ' ' + IMAGE("/img/samples/color_yellow.gif", "yellow",20,20) + ' ' ...
user avatar
  • 3,230
0 votes
0 answers
30 views

Check Queue Name in Formula

Is it possible to reference a queue by name within a case escalation formula? Salesforce throws an error that looks like the view source of an entire web page when I try to use either of these to ...
user avatar
  • 11
-1 votes
2 answers
29 views

Can I change the interval at which formula is recalculated for longer? (like for every 6 months)

I want to change a recalculation period of formula to 6 months. How could I do this? Can I do this at all? Could we schedule it somehow? With the use of flow/ code?
user avatar
0 votes
1 answer
37 views

formula field condition

I want to express this condition with my new formula type field that returns text Green Flag: is still valid Orange Flag: 1 year approaching its end. Red Flag: no longer valid so exceeds the "...
user avatar
-2 votes
1 answer
162 views

Formula: How to convert 24 hour time format to 12 hour time format [closed]

I have a date/time field Due_Date__c which I am using as a default value in an email quick action body. The return type of this formula is Text. Here is the Due_Date__c field output: 2022-03-24 16:00:...
user avatar
-1 votes
1 answer
56 views

How to show number field with its format in Text formula field

I have a field called "Annual Amount" and it is a number field. I am using this in an email quick action and I am returning this field in the email body where the return type is text. For ...
user avatar
-1 votes
1 answer
81 views

How do I remove the last instance of a character combination using formulas?

I am currently creating a flow where a text collection is combined into a single text variable using a loop. After each item of the collection is added to the text variable I add a divider such as , ...
user avatar
-3 votes
1 answer
42 views

Incorrect parameter type for operator '<'. Expected DateTime, received Date

I am trying to keep an alert in the form by creating a formula field, and I am getting the following error: Error: Incorrect parameter type for operator '<'. Expected DateTime, received Date IF( ...
user avatar
0 votes
1 answer
28 views

I have a Cross object checkbox formula that checks whether a texbox has been checked or not. Why does it return a "No" if the box is checked?

IF(Member__r.Member__r.Confirmed_Certification_Holder__c = TRUE, "Yes", "No")
user avatar
1 vote
1 answer
174 views

Get Current logged In User Id in Lightning Flow

I referred this to get logged in user Id in the flow but it doesn't seem to be working for me - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A86vHSAR I have the below flow ...
user avatar
  • 4,521
2 votes
1 answer
162 views

Time-to-Text conversion in Flows

I use the "Get Records" element to retrieve an object and select "Choose fields and let Salesforce do the rest" to save a field of type Time on this record. (I've tried "...
user avatar
-1 votes
1 answer
34 views

Date Fields Calculating [closed]

I have a scenario where I should get the number of days between task Due Date and completed Date. Ex : Due date is : 24th March 2022 Completed Date is : 30th March 2022 In between the number of ...
user avatar
0 votes
1 answer
73 views

Validation rule on email global action

I have a requirement where the users will be sending outbound emails from lead, opportunity and other custom object records. Now, the recipients of these emails will be internal salesforce users, but ...
user avatar
-2 votes
1 answer
32 views

Removing first character under condition - formula

I came to ask for help about formula with multiple conditions, unfortunately I didn't manage any attempt to work properly. I appreciate any suggestions :). If National Id. Number begins with 0 and has ...
user avatar
0 votes
1 answer
39 views

Shorten a Nested If Formula for Fiscal Year

I created a formula with nested if statements. Since the conditions are similar, is there a way to write it elegantly? Fiscal_Year__c is a picklist field with values such as 20-21, 21-22, 22-23 etc. ...
user avatar
0 votes
1 answer
31 views

Extract 1 to 3 Digit Number from Parenthesis Within Text Field

I have a field called 'Line Description' that contains a quantity in "( )" then a description of the item. Example: (12) ABC Extenders. I am trying to extract the quantity in Number format. ...
user avatar
0 votes
1 answer
43 views

Formula problem with Multiple Condition

I need help please, I created two fields, the first is "Group" of text type and the second is "status" of formula type The status must check the condition of If Group contains '9','...
user avatar
0 votes
1 answer
70 views

Increase size of an image formula field

Hi all I have written a formula field Flagstatus which updates each time a choose a picklist value from the picklist field flag.The red flag is displayed when I choose red in the picklist and so on.. ...
user avatar
0 votes
1 answer
116 views

Formula Field Displayed as Null when running a flow

I have a flow that is evaluating the value of a Formula field to decide the path it should follow. The issue I'm encountering is that the Formula field is displayed as Null even though it should be ...
user avatar
0 votes
0 answers
34 views

Calculate Fiscal Year, Quarter for 4-4-5 custom fiscal year setting

We are trying to move from standard fiscal year(April 1st to March 31st) to custom fiscal year that follows 4-4-5 model. We wanted have a custom field to calculate fiscal year, fiscal quarter and ...
user avatar
  • 10.1k
-2 votes
3 answers
56 views

Cut required characters from Text [closed]

I have a requirement to cut certain characters from string which is a long text field The String is as follows: To: Test1@test.com; Test2@test.com CC: BCC: test3@test.com Attachment: --none-- ...
user avatar
1 vote
1 answer
32 views

Building date based on the selection from the user

EDIT: CASE( cycle__c, 'Monthly', ADDMONTHS (selected_date__c, 1), 'Yearly', IF( AND( MONTH(selected_date__c) = 2, DAY(selected_date__c) = 29 ), DATE(YEAR(...
user avatar
  • 6,561
0 votes
0 answers
37 views

Can you help me parse out some pipe delimited values

I have this string that I need to parse out values using a formula field. I have working examples from values 1 , 2 and 3 but I can't see the pattern within these to extend to values 4 , 5 and 6 in ...
user avatar
0 votes
1 answer
21 views

How to specify 'Date before current month' in this VR?

this validation rule should say "one of these three fields has changed AND Stage=Posted AND Close Date is before the current month" but it's still permitting edit of Stage, and I'm not sure ...
user avatar
  • 19

1
2 3 4 5
32