Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 2995

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.

6 votes

Error: Syntax error. Missing ')' -

Migrating this formula between orgs would be at best an annoyance. My second recommendation is that you make use of CASE statements to dramatically simplify the syntax. …
Adrian Larson's user avatar
  • 151k
2 votes
Accepted

Use OR in formula TEXT

Nesting If functions is one valid way to execute this logic, though the CASE function uses fewer formula characters: CASE( Account.RecordType.Name, "ABC", Account.ABC__r.Name, "XYZ", Account.XYZ …
Adrian Larson's user avatar
  • 151k
2 votes

Conditional Formula leveraging checkbox (Error: Error: Incorrect parameter type for function...

It's easier to catch these issues if you indent everything. IF( OR( ISPICKVAL(Picklist1, "Customer"), <-- Condition (Boolean) ISPICKVAL(Picklist2, "Customer"), <-- Condition (Bool …
Adrian Larson's user avatar
  • 151k
3 votes

Determine if WhoId is for lead in formula field

If your field is Is_Lead__c: Who.Type = "Lead" If your field is Who_Type__c: Who.Type Note that in queries, you could even just pull Who.Type directly, with no need for a formula. … Since you haven't made your end goal clear in the question, I included the latter formula as well. …
Adrian Larson's user avatar
  • 151k
4 votes

What is the MOD value when OR is given?

That formula yields true when Count__c is 0 or any odd number. …
Adrian Larson's user avatar
  • 151k
1 vote

Able to display only certain names

If you want a formula that specifies if the running user is in a privileged group, consider Custom Permissions. See: $Permission Global Variable. … Your formula would simply look like: $Permission.MyCustomPermission Navigate to Setup > Develop > Custom Permisions. Click the New button. Specify a Label. Name will auto-populate. …
Adrian Larson's user avatar
  • 151k
1 vote

I Cannot Get an If Statement to Work

BLANKVALUE: BLANKVALUE(Secondary_Contact__r.npe01__HomeEmail__c, BLANKVALUE( Secondary_Contact__r.npe01__WorkEmail__c, Secondary_Contact__r.npe01__AlternateEmail__c ) ) What this formula
Adrian Larson's user avatar
  • 151k
0 votes

Problem on Formula field

If you want it to be blank when both fields are blank, you need to add that as an IF condition: IF( AND(ISNULL(Date1__c), ISNULL(Date2__c)), null, /*current formula as else condition here* …
Adrian Larson's user avatar
  • 151k
2 votes

Count how many times Contact is Populated in a Lookup?

This is a perfect use case for Declarative Lookup Rollup Summaries. It is a free open source library which allows you to create rollup summaries for lookup relationships in a point-and-click manner. …
Adrian Larson's user avatar
  • 151k
0 votes
Accepted

Currency or Number in Process Builder formula

Change the operator and your formula should become valid. The correct formula should be: "Annual Spend: " & TEXT([Opportunity].Annual_Spend__c) …
Adrian Larson's user avatar
  • 151k
0 votes
Accepted

Concatenate Picklists In Formula

You have missing commas where you need them, and extras where they don't belong. You have also confused yourself by mixing || and AND; their syntax is different. I recommend you stick to AND and OR fo …
Adrian Larson's user avatar
  • 151k
2 votes
Accepted

Process Builder - Formula Execution

You need to prefix the fields like [My_Object__c].Field_Path__c, so your formula should instead look like: (CASE([My_Object__c].Mission_Aligned__c, "No elements aligned",0, ... … Or just use the formula editor to insert the field and you will see the proper syntax for yourself. …
Adrian Larson's user avatar
  • 151k
3 votes
Accepted

ISNUMBER() Formula function not behaving as expected

You need to check ISNUMBER first in your OR conditions. That way, it doesn't try to do the number comparisons in the case where it is NaN. If you put them first, it will evaluate them when it should n …
Adrian Larson's user avatar
  • 151k
2 votes

Incorrect number of parameters for function IF() what are the three required parameters?

In fact, if you do not need the field to be writeable, you can even use just a formula. … All you need for your criteria/formula is this part: UnitPrice < Discount_Floor__c Because IF(Checkbox__c, TRUE, FALSE) evaluates the same as Checkbox__c. …
Adrian Larson's user avatar
  • 151k
1 vote

Formula with two different objects

If you are open to managed packages you can use Declarative Lookup Rollup Summaries to determine how many such children there are, then in your formula check if that number equals 0. …
Adrian Larson's user avatar
  • 151k

1
2 3 4 5
9
15 30 50 per page