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
18 views

Process Builder Formula for Case Status in Salesforce

In our Case process builder, we current have a step where the status is set automatically depending on the value of a custom picklist field. The formula looks like this: CASE([Case].CaseOutcome, '...
0
votes
1answer
12 views

Error: Syntax error. Missing " on billing state in account object

I'm trying to assign a territory based on BillingState field in Salesforce and getting syntax error message Error: Syntax error. Missing " IF(ISBLANK(BillingState), "None", IF(CONTAINS("CA:WA:...
0
votes
1answer
10 views

formula field on master record that displays a text field on the max child record

I have a custom object, Recoveries Placement, related to the Case object in a master-detail relationship. I need to surface a text field from the MAX Recoveries Placement record on the Case layout. ...
0
votes
0answers
12 views

Creating an advanced report formula

My goal is to apply this formula --> NPS = (Promotores / neutros) - (Detractores / neutros) Where promotores = 6, neutros = 3 and detractores = 5 . I don't know how to get these values in the ...
0
votes
0answers
30 views

Getting a Percentage ratio from custom picklist values [closed]

I'm not having much luck solving this problem myself, so I thought I would reach out. In my Org we have a custom Picklist field on Tasks and Events called Call Occurrence. Call Occurrence has two ...
0
votes
1answer
14 views

How to pull data from Account to Activity?

I created a Text Field on Account. I want to create a field on Activity so that my Account Field displays there. Is that possible? if so, How? Thanks
1
vote
0answers
26 views

FORMULA FIELD DATE FIELD WORKING DAYS

I have 2 date fields which calculates the number of working days of 2 date fields. here's my forula: ((DATEVALUE( Application_Received_Date__c ) - (DATEVALUE( Date_Test_Field__c )))) - (CASE(MOD( ...
0
votes
1answer
16 views

How to use Date/time as Date field in Sobject Validation rule?

I need to compare one date field (Date/Time) with Parent Objects Date field(Date/Time). When these two values are not equal then need to fire validation rule. Formula: DATEVALUE( CallDateTime__c ) &...
0
votes
0answers
14 views

Query to AccountContactRelation exceeds 2,000 characters? Is there a simpler solution?

I'm attempting to pull in a related contact ID to account given the account ID and contact role. My query ends up exceeding 2,000 characters causing the rest of my formula to exceed the 5,000 ...
0
votes
0answers
14 views

Formula Field on Timezone and DST

I have a business use case that users would like to see if a lead is callable within local time zones. I created two pick lists that would do the trick, but I am running into compile limits. Is there ...
0
votes
2answers
36 views

How to build a formula with several IF

How can I build a formula with several IF like this: IF(((field_name = 0) || (field_name = 1)), 'Test 1', '') IF(((field_name < 0) || (field_name = 2) || (field_name = 3)), 'Test 2', '') I ...
0
votes
0answers
13 views

the field Case Time Duration(Formula) in Business Hours doesn't update every hour

Im trying to show the Case Time Duration in Business Hours. But it doesn't update every hour. I used this formula: ( 5 * FLOOR( ( DATEVALUE( NOW() ) - DATE( 1900, 1, 8) ) / 7) + MIN(5, MOD(...
0
votes
0answers
33 views

NOW() formula not working as expected

I have a process builder that contains the NOW() formula for whenever a particular action is completed. I am running into the issue of it populating the date/time as the day before at 6:00pm. Would ...
0
votes
1answer
22 views

Help with formula - syntax error

I'm trying to say if an opportunity goes from Stage 4 OR Stage 5 to Lost, mark the checkbox field ("Stage 4 or 5 Lost") as true. Getting a error: The formula expression is invalid: Syntax error. ...
0
votes
2answers
25 views

Process Builder Formula Question

I'm used to building process builders with conditions but this new Org that I'm in uses formulas. I'm trying to make this criteria formula work: AND([Launch__c].RecordType.Name=Blue) ...
0
votes
0answers
33 views

File:/// formula field not rendering url in hyperlink for a user

I have a user with issues (maybe after Spring '20?) with a hyperlink formula. Formula is a simple text output type of the form: HYPERLINK ("file:///bob.txt" , "TEST") The different output HTML is ...
0
votes
1answer
168 views

Unable to edit/save emails with custom formulas for Classic Email Templates - Spring '20 Release

There have been ways in the past you could use (hack) custom formula's within Classic Email Templates to render content depending on the scenario. For example, you can use this formula directly in the ...
0
votes
1answer
24 views

Convert two separate fields Date and time fields to milliseconds

I have two separate fields Date and Time fields. I would like to convert these fields into seconds format. I am using this seonds format to make google API call. https://maps.googleapis.com/maps/...
1
vote
0answers
19 views

Get number of hours (in decimal) that is spent in two timeframes

I have a booking system inside my Salesforce that has a start DateTime and an End DateTime. I am wanting to find out the number of hours spent in 2 different time frames. 07:00:00 to 21:00:00 & 21:...
0
votes
0answers
12 views

Process empty values in Process Builder

I want to update five fields in the contact object, coming from "Log a Call" (activity). - These fields always show the latest call. - I want all these five fields to be updated - even if they're ...
6
votes
0answers
47 views

Possible Bug in Spring '20 - Process builder formula doesn't save BR()

Since being upgraded to the Spring '20 release, a process that we have has stopped saving BR() in a formula to the Rich Text field it is populating. Formula in Process: "... next steps." + BR() + "&...
0
votes
2answers
17 views

Automatic Date Stamp on a Stage Change

I want to add an automatic date stamp when an opportunity moves from Stage 1 to any other Stage that isn't closed.
0
votes
2answers
36 views

Trying to create a validation rule to stop the user (a mechanic) from updating or editing a repair record once the record has been marked completed

The Mechanic will fill out a repair record and can mark it as 'Not Started', 'In Progress, and 'Completed'. Once they mark the repair record as completed they should not be able to edit any of the ...
2
votes
1answer
39 views

Change picklist field with another picklist field in a formula throws 'Compiled formula is too big to execute'

I have a simple formula that is referenced in other formula. When I tries to change a pickist field with another picklist field I can't save with the following message: Formula(s) that reference ...
1
vote
1answer
18 views

Formula in Workflow Rule not triggering when it should

I have a workflow rule that should be creating a Task when someone creates a new opportunity with an amount over $500. But for some reason it isn't triggering (yes, I checked to make sure it's active)....
1
vote
1answer
26 views

Possible to have a hyperlink field that is NOT a formula field?

Is it possible to set the value of a field such that it renders as a link in the UI (e.g. in a report column) WITHOUT the use of a formula field (for example, setting field value from Apex)?
0
votes
1answer
35 views

Formula field not showing value between 2 related object

I have 2 objects Contracts - Custom Sales Submission (Opportunity Process) - Custom They are related because of Lookup relationship. GOAL: I want to show in Sales Submission Object that when the ...
2
votes
1answer
74 views

extract year, month, day, from date field in a report? [closed]

I was wondering if it would be possible when creating a report to have individual columns for each portion of a created date field (column for year, column for month, column for day)? I know I could ...
1
vote
1answer
113 views

How to reference Choice Value in formula instead of its label?

I have a Picklist screen component in a Flow which has many choices defined in the same flow: Now I need to make a formula that references the Choice Value of a given choice: If I use UPPER({!Plan} +...
0
votes
1answer
37 views

if statement in process builder formula

I have a process builder formula where I need to set a date custom field based on if statement: IF ( ISPICKVAL([Account].Status, 'Active') ) Then set [Account].Custom_Date__c + 20 Please ...
-1
votes
2answers
59 views

Conditional formula field

If I have the object Animal__cwith the fieldsColor__c and Shape__c. How Can I make a conditional formula field Country__c which is dependent of the values ofColor__c. Example: If (Color__c ='...
0
votes
2answers
31 views

Change date format in formula to MM/DD/YY

I have a formula that uses a date field that returns a date with a format DD/MM/YYYY. I need to change the format of this date to DD/MM/YY. TEXT(DAY(ExpectedDeliveryDate__c))+"." +TEXT(MONTH(...
0
votes
1answer
37 views

Error: Syntax Error. Missing '=' for formula

Please help . I am receiving a syntax error for this formula. Tried many ways. Not able to figure out. I am sure i must be doing something silly. Error: Syntax error. Missing '=' AND( NOT(...
0
votes
0answers
14 views

Profile photos using IMAGE formula field referencing a URL field

It seemed pretty simple in my head but I am struggling to write the formula...and now I am beginning to wonder whether this would be supported. I want to have users associate photos with new records (...
1
vote
1answer
34 views

Fairly complex salesforce formula help

I'm trying to trigger a workflow rule over several criteria including a check against related objects (Line items) record type names. The idea is that if this all evaluates to true, it will trigger a ...
0
votes
1answer
37 views

Formula to update multi-picklist with Process Builder

I've created a process to update a multi-picklist (Cloud Name) based on some words contained in a text field (Title) - it works but due to the pick values I am getting false positive. if(Contains([...
2
votes
2answers
53 views

Help with Formula field IF

I am creating a Formula field that returns texts when: Picklist_Status = Activated, the return text should be A else null Picklist_Status = Sold, the return should be B else null Picklist_Status = ...
2
votes
1answer
61 views

The flow failed to access the value for myVariable_current.Account.Owner.UserRole.DeveloperName because it hasn't been set or assigned

I am getting these two process builder error's Error element myDecision (FlowDecision). The flow failed to access the value for myVariable_current.Account.Owner.UserRole.DeveloperName because ...
4
votes
0answers
20 views

How are self referencing formula fields handled using Replication API?

My understanding is that formula fields or rollups are not calculated in the object that is being queried using the Replication API. Is this also the case if the formula field value is calculated from ...
0
votes
1answer
34 views

Formula to update a custom field with the number of days at the current opportunity stage

Is it possible to create a formula to update a custom field with the number of days at the current opportunity stage, triggered when the opportunity stage path value is changed?
0
votes
1answer
56 views

Process Builder Formula to Create Task for Account Owner not evaluating to True

I have created a formula in process builder that when evaluated to True, should create a task. Properties: When a record is created or edited Formula evaluates to true Immediate Action: Create a ...
0
votes
0answers
34 views

How to check Weekend days between two dates?

I have Three fields start date,End date and time off. If i give Time of(Number) is 4 and Start date Today, End date will update with Today+4. If i give Start date Friday and time off 3 as per the ...
0
votes
1answer
48 views

How to store modified field date in another date field

I have a picklist field, Values: value1, value2, value3, I am trying to count the number of days that value1 stayed, until it changed to value2 and going forward. I am trying to do with workflow as ...
0
votes
0answers
33 views

Display seconds in formula using date/time

How can seconds be displayed in a formula field that references a rollup summary field that calculates the MAX value of datetime field from the child objects? The rollup summary contains a datetime ...
0
votes
1answer
21 views

Formula Field on Activities Object is resulting in syntax error

I am somewhat new to formulas. I have a formula field created on the activities object that is supposed to return a date. I am getting a syntax error when I check the syntax checker. My formula ...
0
votes
0answers
18 views

How do i update Hierarchy Custom Settings fields if the field's api name matches with UserRole DeveloperName?

Background We have a Action on Case with ActionType: Send Email where we are populating HTMLBody with user's signature under Predefined values Section. We also want to add tag line at the end of the ...
0
votes
0answers
19 views

Formula to reassign case record to a new owner

The Criteria below in PB will reassign the case to its relevant queue when the type field contains a certain value and the current owner is a queue, but I also want to add logic where a user should be ...
0
votes
1answer
31 views

Required fields under Record Types and Subcategory type [duplicate]

I need to make those fields required under 2 conditions. Record type and Subcategory (picklist). I stated doing Validation rules, for the first one: Record type: Passport Subcategory: Renewal and ...
0
votes
0answers
14 views

Calculate Arrival date minus Lead Created Date formula

I am looking to add a formula in a lead report that calculates the arrival date (2/8/2019) from the lead. Arrival date minus Lead Created Date
0
votes
1answer
34 views

Workflow formula field update

I want to update the field through workflow that price__c = 1000 and price__c is a number data type. But i am unable to field update, it is throwing an error: Error: Formula result is data type (...

1
2 3 4 5
27