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
0 answers
16 views

Referencing Setup Custom Settings Fields in Salesforce CPQ Quote Terms

I'm trying to reference a custom setting in Salesforce CPQ's quote term object, although instead of displaying what's in the field, it's just showing the formula. This is the formula {!$Setup....
Josh Bridgman's user avatar
-4 votes
0 answers
40 views

How to extract last 3 characters from number field within formula

I need to extract first 3 letters of text field, and last 3 characters of number field to create a password with it. Please help me to get certain functions to use logic in formula field....
Suseela yadagiri 's user avatar
-2 votes
1 answer
28 views

What formula do I use to divide the total opportunity amount over the program duration period showing the projected monthly revenue?

Closed won opportunity amount = $30k Est start date field = 10/1/2023 Est end date field = 12/31/2023 Looking to display something similar to the below. October monthly revenue = $10k November monthly ...
Kristin Kennedy's user avatar
-1 votes
0 answers
22 views

sending an e-mail after 24 hours only between 6 AM to 4 PM using salesforce flow

How can i implement sending an e-mail after 24 hours only between 6 AM to 4 PM using salesforce flow. For example , if datefield__c(datetime) on account is changed between 6 AM TO 4 PM we need to send ...
Salesforce developer's user avatar
0 votes
1 answer
39 views

How to find first Monday from given date?

I'm trying to find the first Monday from a given date, and so far I've come up with the following formula, but it returns the first Monday of the month for the given date. Could you help me fix it, ...
Sebbie's user avatar
  • 29
0 votes
0 answers
24 views

For the filter: Invalid date (Valid date format D/MM/YYYY)

Our report does not work when we add a formula(Date) field on the report filters and whose value is set to a relative date such as CURRENT FISCAL YEAR. The error is: For the filter 3: Invalid date (...
dev4life's user avatar
  • 362
2 votes
1 answer
42 views

Mystery Error Message For Flow Entry Criteria Formula

I am attempting to use a formula entry criteria in an after save flow. However, I run into errors when checking the syntax. My starting formula for the flow is exhibit 1) and when I click check syntax ...
KB2021's user avatar
  • 83
0 votes
1 answer
15 views

Help adding to formula

I need to add logic to this formula, to add "IF (texcellency__DefHC_NumEmployees__c OR custom_number_field__c < 2749, "Small", IF ( texcellency__DefHC_NumEmployees__c OR ...
Megan Blotzer's user avatar
-2 votes
0 answers
43 views

Convert any Time Zone to EST using formula field/variable

When a certain field is updated, a screen flow shows text with the date Now(). We do have users who utilize several TimeZones in their Personal Information Settings, though. Is there a way to ...
newbieApexLWCDev's user avatar
0 votes
1 answer
32 views

Validation Rule for specific text values

I have a requirement to create a validation rule on a text field where the values must be capitalized, and restricted to specific values. I realize that converting this field to a picklist is the ...
Drew's user avatar
  • 11
0 votes
0 answers
57 views

Row Level Formula With Picklist

I am trying to say if campaign names are equal to certain names, then change from registered to attended, otherwise just put the results of the field. The issue is that the field is a picklist so ...
AaGel12's user avatar
-2 votes
0 answers
25 views

Formula field question

how to make formula if student is from pune,Newyork<london,sydney then rating needs to be Placement Scope 'HIGH' If background is engineering and from any city then its also HIGH. I made some ...
binal Patel's user avatar
-1 votes
1 answer
24 views

Set the value of a formula field by coping the value of field within the object but only to a specific record type

We have contact object with two record type. One is A and the other one B. We have field called last name and prefeered name on A record type. We dont use the preferred name on B record type. I am ...
Kamala Pokhrel's user avatar
0 votes
2 answers
48 views

Validation rule to prevent field change

I have trouble with this validation rule on Account. It should allow changes on MainBrand__c only if MainBrand__pr.WebsiteRelevant__c = true and RegistrationDoubleOptin__c = true. I tried this but not ...
Ивелина Иванова's user avatar
0 votes
3 answers
119 views

If Statement with complex logic

I have the formula which works as expected, but I wanted to add if listamount > 0 Opportunity name Upgrade, if listamount < 0 Downgrade, if = 0 then cancelation So I tried a couple of versions ...
Ulvia J's user avatar
  • 15
-2 votes
2 answers
32 views

Add a "0" to the left of the postal code

I would like to put a formula in a flow to update the postal code if it only contains 4 characters. All my postcodes must be 5 characters long so I would like to add a 0 to all the postcodes that are ...
WizeQuestion's user avatar
-2 votes
0 answers
52 views

Checkbox Formula Field that Evaluates if Time is between Two Values

I've created a field called Current_Date_Time__c that displays the current date/time in the following format: 7/09/2023 8:40 AM. I'm trying to create a new checkbox formula field that evaluates as ...
Josh Bridgman's user avatar
0 votes
0 answers
40 views

Weird Behaviour Salesforce formula

I am trying to create a formula that will display various emojis (red, yellow and green) depending of the time a lead spent into various stages. For example, if the lead is in the stage "assigned&...
Alban van Rijsewijk's user avatar
0 votes
1 answer
18 views

Formula field to define FCR met or Not Met

trying to build a formula field to define FCR and my formula always turns wrong. The first part works correctly however I'm receiving an error : Field Reason_for_Reopen__c is a picklist field. ...
B Hassine Qais's user avatar
-1 votes
1 answer
16 views

Why am I getting this error when I sue the solution posted for how to use a picklist field in a formula field

Error: Incorrect parameter type for operator '+'. Expected Text, received Number The formula content is this: I need to pull together the Tracking # + the Case # + the Pickup Type__c, which is a ...
Laurie Abbott's user avatar
-2 votes
1 answer
22 views

Sort list/kanban view by integer formula field

I have a requirement in which I will need to sort a list/kanban view by an integer formula field. Is this possible? I've checked the documentantion and found nothing related to this topic. Thanks in ...
molinet's user avatar
  • 835
0 votes
1 answer
19 views

How to detect Formula Expressions exposing vulnerable information like session id?

There is a snippet from the Salesforce Security Guide (Version 58.0) Formula Tag heading explaining why it is a security vulnerability : The general syntax of these tags is:{!FUNCTION()} or {!$OBJECT....
compski's user avatar
  • 1,227
0 votes
1 answer
49 views

I need to create / automatically display an age rounded to the nearest half year. My formula is only giving me to the year

I need to display a formula field that shows the age rounded to the nearest half year. For example: if the DOB is 01.01.2012 then that persons age would be 11.5. The formula I'm using only displays 11....
jessilundquist's user avatar
-2 votes
1 answer
42 views

Treating Blanks as Zeros within a Salesforce formula

I have this formula created to work out the number of days between created date and the closed date, but also this takes away the time which the opportunity was sat with a broker. However, I have ...
Jason Appleton's user avatar
0 votes
0 answers
39 views

Translation of Record Name value

I have an Object A with a lookup field to Object B and a Language__c field. I would like to create another field on Object A to display the record name value of the record from Object B in a correct ...
mascot's user avatar
  • 533
-3 votes
1 answer
38 views

How to edit text which displays in a column

On a report, there is a column which has very long text, with prefixes of 'Partner Programme' How can I remove the prefix of 'Partner Programme' so that when displayed on a Dashboard, only the text ...
Alex's user avatar
  • 1
1 vote
2 answers
44 views

Creating a due date formula based on case types with different working days

I keep getting an error message saying there's missing ")" I have seen multiple formulas using mod functions and using 1962 as start off days, and honestly when I used those in Salesforce ...
Jasmine G's user avatar
-1 votes
1 answer
26 views

Report Formula errors - multiple conditions in the IF Statement

I am trying to create a formula field that evaluates the lapsed donor status. If (FY1>0 && FY0=0, "Lapsed FY0", "Returned Donor") The above formula works but when I try ...
SFDC2017's user avatar
2 votes
1 answer
46 views

Multiple If Statements on a HTML Email Template

I'm trying to create a Classic Email Template formula that shows a different value based on what's in the Plan_Name__c field on the Work Order object. I've managed to get one IF statement working but ...
Josh Bridgman's user avatar
-1 votes
1 answer
36 views

create % column in Salesforce summary report

Have this Summary Report in Salesforce (Lightning) and I want add an extra column for % of the Total. So I add a “Summary-Level Formula Column” and used this as the formula …. RowCount/PARENTGROUPVAL(...
Rod Bartlett's user avatar
0 votes
1 answer
25 views

Is it possible to use an object field as part of regex rule?

Let's say I'm looking to use the state abbreviation as part of a validation rule, for example, California: CA-1111. I'm trying the following logic but it's not returning the desired output. NOT(REGEX(...
BB0202's user avatar
  • 13
-1 votes
2 answers
37 views

Row level formula - Syntax error. Extra IF

I'm looking to group company segments by using a Country lookup. I have a string that looks up a specific country (i.e. DE) and then a CONTAINS function which is looking up more than one Country (GB ...
Stephen Clarke's user avatar
0 votes
2 answers
37 views

Formula containing picklist and checkbox returning error - error "Incorrect parameter type for function 'AND()'. Expected Boolean, received Text"

Need a advise. I have created a Formula field that supposes to return the Text value. However I am getting the error Incorrect parameter type for function 'AND()'. Expected Boolean, received Text. ...
Bishta's user avatar
  • 1
0 votes
1 answer
35 views

Row level formula in Salesforce

I am looking for some help on building a row-level formula in Salesforce. I have the below formula which is confirmed as valid but I would like to add multiple countries to the Country string rather ...
Stephen Clarke's user avatar
0 votes
1 answer
43 views

How do I write a formula looking for values to the RIGHT of a ","

How do I write a formula looking for values in a separate field to the RIGHT of a comma. So if I have field A that lists out "Red, White, Blue" How do I write a formula in field B that ...
Kate Colson's user avatar
0 votes
1 answer
24 views

Formula field error for checking blank number field

I am trying to create a text formula field called "Check number of mobiles captured": TEXT( IF( ISBLANK( Account.No_of_Mobs__c ), "No", "Yes"...
Timmy's user avatar
  • 11
-1 votes
1 answer
41 views

Formula to display time difference in minutes between 2 fields while excluding weekends

I'm facing an issue with a formula, and I could use some support. I have a requirement to calculate the time difference in minutes between two datetime fields, Email_First_Reply_Date_Time__c and ...
Carmen Groza's user avatar
0 votes
1 answer
56 views

Includes formula in record triggered flow not triggering

Ive got a multipicklist field that i want to use in the entry criteria of a record triggered flow and it seems to never trigger the flow. When i choose "All conditions evaluate to true" and ...
AES's user avatar
  • 1
0 votes
1 answer
36 views

Nested IF CONTAINS AND Formula - results not returning correct answers - What am i doing wrong?

I am looking to return the values to an Expected Revenue column, based on the WEB FORM CAMPAIGN field having specific words in. The campaign names are set up like the following, so I am looking for ...
Rob Boyton's user avatar
1 vote
1 answer
107 views

Restrict users from changing Opportunity Stage thorugh UI

I have a task to prevent users from changing the Opportunity Stage manually, except for a subset of users which do not share the same profile. I created a custom permission and a new permission set ...
Gabriel Gonzalez's user avatar
-1 votes
1 answer
29 views

Nested OR function in validation

We're trying to add another validation to require either ISBLANK(Commission_Percentage__c) OR ISBLANK(Commission_Amount__c), since they only have to complete one of these fields in addition to the ...
Jessica Kaiser's user avatar
0 votes
1 answer
42 views

How to test two conditions in formula field IF

So I'm stuck on the logic here this was my original code and it worked but I was also trying to add a condition that if TODAY()-LLC_BI__Covenant2__c.LLC_BI__Next_Evaluation_Date__c) > 0 is true ...
Albert Chen's user avatar
-2 votes
2 answers
44 views

Error when encoding row-level formula: Syntax error. Missing ')'

Does anyone know why I am getting this error? AS far as I can tell I have all the ( ) closed? IF( ISNULL(LLC_BI__Covenant_Compliance2__c.LLC_BI__Evaluation_Date__c) AND( (TODAY()-...
Albert Chen's user avatar
1 vote
1 answer
31 views

Flow Formula Returning Null

I have a CSV file with a Date of Birth field in the format of "MDDYY" or "MMDDYY". I'm importing with Data Loader to a Text field, which triggers a Flow to fire upon record ...
Snowlian's user avatar
1 vote
0 answers
98 views

Adding new custom column to Forecast Type in Forecasts

I haven't worked with forecasts before, but I'm required to add a new column to appear in one of our Quota tracking reports. The main fields of the report are Forecast Category and Quota amount, and ...
David Boada's user avatar
2 votes
1 answer
99 views

How to clear the value of picklist field with a formula field

I have an action on the Account object where I want to update some values on the record. In some conditions I want to force the user to re-select a value for a picklist field (Account Country). My ...
Lara Wasowski's user avatar
0 votes
2 answers
78 views

How to round number down to nearest multiple of 7?

I'm trying to find Salesforce's equivalent to Excel's =FLOOR(number,significance), and more specifically, I'm looking to round down a number to the nearest multiple of 7. For example, if number=303, ...
Sebbie's user avatar
  • 29
1 vote
0 answers
39 views

Formula that calculates the percentage of a column in a report

I have a Salesforce report that is grouped by a field called Forecast Category, it is a picklist field, it also has a Quota amount which is a currency field. The requirement is to have a new column in ...
David Boada's user avatar
0 votes
1 answer
53 views

Error: Incorrect parameter type for TEXT. Expected Number, Date, DateTime, received Picklist

I have a picklist custom field, let's call it Class__c of Unit custom object. I want to assign a default value to it. Default value is current user's Unit__c value. User's unit is also a picklist ...
salesforce Uz's user avatar
1 vote
1 answer
126 views

How to check if time is between two times

I am creating a field to identify if a Resource is scheduled to work based on the current time without considering the date. I'm using the formula IF(Current_Time__c >= Time_In__c && ...
Rian Repuela's user avatar

1
2 3 4 5
36