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
17 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
20 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
14 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
12 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
21 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
18 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
41 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
38 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
16 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
23 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
34 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
39 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
86 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
27 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
58 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
24 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
34 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
13 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
33 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
36 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
49 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 = ...
-1
votes
0answers
30 views

How to stop counting days using a formula, when a pickist is changed

I have a Picklist called 'status' it has values Tier 1, Tier 2, Tier 3. I have created three fields (Days in Tier1, Days in Tier2, Days in Tier3) to count no of days in each Tier. These fields should ...
2
votes
1answer
41 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
30 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
46 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
30 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
45 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
15 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
17 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
30 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
13 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 (...
0
votes
0answers
22 views

Need help on copying values from a text area field separated by new line to two separate fields

I have a custom field Details populated by the Case's Subject and Case Description separated by a newline. In process builder, my formula to update Details field is Case.Subject & BR() & ...
4
votes
1answer
64 views

Predefined Field Value for Picklist

I created an Update Record quick action. Inside the quick action I am trying to update one field which is a picklist field. The picklist field have these options: Item 1, Item 2 and Item 3. I want to ...
0
votes
1answer
24 views

I need to add a variable number of business days to a date

I have a field in the products called RPG_LeadTime and this is the product lead time before we are expecting to dispatch the product. So if the date is 23.12.2019 and the lead time it two days then ...
0
votes
0answers
29 views

Looking at related opportunities close date

I am creating a formula (text) field 'Sub Cohort' on our Subscription object. Formula: IF( ISPICKVAL(Opportunity__r.Type,"New"), CASE( MONTH( Opportunity__r.CloseDate ), 1, ...
2
votes
1answer
68 views

Referencing Custom Settings in Row Level Formulas in Reports

We have a Custom Setting field that contains a value which we update on a regular cadence. With the release of Row Level Formulas on Reports we suddenly have several reports that need to reference ...
2
votes
1answer
51 views

Workflow Field Update: Computing invalid date error - Invalid date formatting?

I have a workflow that updates a field based on a users schedule. The workflow action to update the field is telling me that it is computing an invalid date, I haven't been able to identify what the ...
0
votes
1answer
42 views

Do extra brackets matter in formulas?

I am creating a Validation rule. Trailhead states that I should use following formula: ISPICKVAL( StageName , "Closed Won") && ( Delivery_Schedule_Date__c - CloseDate ) > 14 I have the ...
0
votes
0answers
33 views

How to mass refresh records

Is there any way to mass refresh an object with records over 1 million? Based on the values of this object, the related parent records will be updated I tried using formula field but that didnt work ...
0
votes
0answers
37 views

Formula to get lessor of two date fields before comparing to another third date field?

I am trying to find the lessor of two date fields, then comparing that "lessor" date field to another date field to trigger a checkbox on/off. Here is the current formula, however, im trying to ...
0
votes
1answer
28 views

how to write formula to get year end date based on system.today

how to write formula to get year end date based on system.today.ForExample: if i open 1/1/2020 that field will be show 31/12/2020 like that i need formula
0
votes
3answers
36 views

What happens with an IF formula with multiple TRUE conditions?

I have a multi nested IF statement like below - what happens if a field meets more than one condition - is there a rule to determine which value gets returned? IF(CONTAINS( Custom__Name__c , "/cs/"), ...
0
votes
1answer
15 views

How do I send an email based on a date difference?

For example, I have some DateTimeField__c, and if DateTimeField__c - NOW() = 11 (hours), I should send an email. Trigger is not a variant, because I can't check with it a formula field. A Scheduled ...

1 2 3 4 5 27