Questions tagged [formula-field]

A formula field is a field that automatically calculates its value from other fields, expressions, or values.

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

Is there a way to define if a field is Ever Updateable, if Update access can be granted to a field by Profile or Permission Set?

Is there a way to define if a field is Ever Updateable, if Update access can be granted to a field by Profile or Permission Set? Field Describe information for a field can define if permissions can ...
0
votes
1answer
18 views

Report - Text Field Less Than number

I want to create a report for an object that has a text field 'identity__c'. The text field is usually in the format of a number and I want to run a report with a filter that will return all records ...
1
vote
0answers
15 views

Is Salesforce Advanced Formula Example for Business Days Incorrect?

Throughout the year we have been using the following formula field from Salesforce Advanced Sample Formula to calculate the number of business days: This is recommended on the Salesforce Website ...
2
votes
0answers
31 views

Formula field's actual formula

IS there any way to get what a configured formula fields actual formula is? Strange ask, I know, but we dont use visual force for our front end. We build it ourselves with JS. The issue then is ...
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 ...
1
vote
1answer
59 views

Change a formula field and get Data Uniqueness Violation - The proposed data changes would violate a uniqueness constraint

Given Existing custom field Asset.SerialNumber (OOTB - Text) New custom field Asset.SerialNumber_bis__c (Text255, External Id non-unique, deterministic encrypted case insensitive) Existing custom ...
0
votes
2answers
44 views

Wrong decimal formula: I can't get the right value

I use this formula field in my apex code. But I have big troubles with it, because there should be different logic for values 0 and NULL. If I choose Treat blank fields as blanks, I'll get NULL even ...
0
votes
1answer
30 views

Months between 2 dates [closed]

I am trying to get the number of months between 2 dates(01'Aug 19 and Today). I am using the below formula, but am geting a syntax error (((YEAR(TODAY()) - YEAR(2019,08,01) - 1) *12) + (12 - MONTH(...
0
votes
2answers
168 views

Multiple IF Statements for Formula Checkbox

I am new to Salesforce, and am still learning about the formula fields...so please bare with me. I am looking to create a formula for a new checkbox called Past Due to perform the following functions:...
0
votes
1answer
100 views

Formula Field based on Subscription Start and End Dates in Salesforce Not Responding as Expected

We have a formula field on the Subscription record called "ARR Contribution". The formula is: Total_Amount__c / BLANKVALUE(SBQQ__ProrateMultiplier__c, CEILING((((...
0
votes
0answers
12 views

Lock text information of a formula field while the original field being changed [duplicate]

Is it possible to lock the text information of a cross object formula field after a trigger while the original field is changed later? enter image description here e.g. ABN and GST fields in the ...
1
vote
2answers
89 views

$Profile.Name in Formula field not updating the checkbox

We have a Custom Field (Formula) on User object which has a simple formula to set the checkbox True if the user's profile is System Administrator. But here i have a user with different profile with ...
0
votes
1answer
49 views

How to display value in formula field using logged in user locale?

Use case, I want to display value of Invoice Date on Quote Template document based on logged in user locale. We have date field in Line Columns of CPQ Quote template where we add API Name of date ...
0
votes
0answers
124 views

Custom URL field shows link with _HL_ENCODED_ in front of it

I have a custom URL field that stores a copy of a URL value from a formula(text) field. The formula field uses the HYPERLINK() to generate a link. When I ouput this field in apex it shows with some ...
0
votes
0answers
19 views

How to find out whether there is leap year between a date range? [duplicate]

Could anyone please advise how to find out between a date range if there is leap year or not. e.g Start Date = 1 Jan 2019 and End Date is 31 Dec 2022 now using formula field or Apex , how to check ...
0
votes
1answer
52 views

formula field to display flag

I am trying to display a green flag when Account status__c(status__c is a picklist field) is Active, else display red flag. I have written below in formula field, but I am getting error message as "...
1
vote
1answer
28 views

I need help with a formula field that's bombing out

I have a field that is a picklist field. Then I have a field that is a formula field that calculates a score based upon the option that is chose from the picklist field. This formula is a Case formula ...
5
votes
0answers
146 views

Formula.recalculateFormulas producing gack

Winter 20 release is in live, so I wanted to use this glorious feature Formula.recalculateFormulas Thus I tried the below block of code: Opportunity opp = new Opportunity(Purchase_Price__c=2000 , ...
1
vote
1answer
48 views

Formula field help, please

I have 3 text formula fields: Field 1, Field 2 and Field 3. I want to create Field 4 formula field that checks if there is value in any of those 3 fields and give the value to Field 4. I have tried: ...
0
votes
1answer
41 views

Different Formula for Different Record Types

I have a custom object that has all the same fields except the value of one depends on the record type. I would imagine I could define a lengthy formula with IF but is there a cleaner way? Ideally, I ...
0
votes
0answers
24 views

How to fetch whatId label in salesforce formula field [duplicate]

I have requirement where in WhatId should be able to display parent name(label) in formula field, i have tried using what.Name in formula field but it displays an error. The below code fetches the 15 ...
0
votes
1answer
17 views

ISBLANK Formula Help

I'm trying compare 2 values and then note if the values match or not via a formula. This is the formula that is working as expected - Nation__c = Planning_Authority_Nation__c,"Countries Match","...
1
vote
1answer
41 views

Validation Rule not firing after new records is created, only existing

Validation Rule is only working for existing records. When new records are created and edited the VR is not firing. Multi-Selection picklist, there are 2 choices: Project manager (default) ...
0
votes
2answers
189 views

Creating a Last Activity Date Formula Field

I'm looking to use Last Activity Date for a report that I am creating for my Sales team, but it does not appear to populate correctly. At least not according to what I've read in the literature posted ...
0
votes
0answers
11 views

How to give URL in IF condition while creating List Button

/apex/AP_xxx?oppId={!Opportunity.Id} This is my URL IF(ISPICKVAL(Opportunity.Class__c, 'xxx') This is my condition How to write URL in if condition in button creation.Kindly help
0
votes
0answers
29 views

Salesforce formula to exclude holidays between two date time fields

I would like to create one formula field on Case object which calculates business hours between two dates. Weekends, as well as Holidays mentioned in Business hours, should be excluded in the formula. ...
0
votes
0answers
25 views

Time based trigger on Formula Date field - what if the date changes on parent

I have a formula field Campaign start date on the child object. Campaign start date = Campaign__r.StartDate I have a time-based workflow that fires an email alert 10 days before this Campaign start ...
-3
votes
1answer
32 views

How to apply 3 conditions in formula field?

I am trying apply 3 conditions in formula field. but I'm to complete the requirement. My formula will be like this IF( AND( CreatedById = 'xxxxxx', ISPICKVAL(Scenario__c ,'Budget'...
-1
votes
2answers
41 views

How to separate Numbers from field data? [closed]

I have a field called Name. The Value of Name field is like 1001PAIO or 100PAJK. I need to divide the Name field into 3 fields. One field should have only Numbers I.e first 3 or 4 digits Second ...
1
vote
1answer
27 views

Error on formula field to add 4.5 years

I have an existing formula field that is displaying an error on the field (#Error!) when the month is June(6). Would someone be able to help in how I should re-write this formula? IF(MONTH( Date ...
0
votes
1answer
316 views

Reference a Contact field as a value in a Task Process with Process Builder

I need to update 3 fields on Task based on the values from the possible related objects (Lead or Contact) using the standard "Related To" field. I need to do this without code. I was thinking of ...
0
votes
1answer
149 views

How to calculate Current quarter and last month of previous quarter in List View?

I need a list view to display List of records of current quarter and last month of previous quarter. I think I need to write a formula field to calculate current quarter and last month of previous ...
0
votes
0answers
24 views

Matrix % Formula to Add Two Columns and Divide by Grand Total

I am looking to create a formula that will calculate % Closed which includes columns Contract Signed and Installation Completed divided by the Grand Total column. Every time I try to identify the ...
0
votes
2answers
52 views

Formula field to calculate difference between years

I have 2 text fields, start year & end year, I want to create a formula field that calculates the difference between these two years entered, and if the end year is current, the formula field ...
0
votes
1answer
37 views

Hyperlink formula to report with multiple field

I want to make a formula with a Hyperlink function in order to display a report in salesforce LEX with pre feel value. I try to begin with this syntax => HYPERLINK("#/sObject/00O58000004Rabl/view?...
0
votes
1answer
62 views

How to write formula field to replace multiple values in the field?

I have a field with the value 1;2;3;4;5;6;7;8 I would like to replace with one;two;three;four;five;six;seven;eight through formula field. Workaround: Used Substitute function: SUBSTITUTE(Name, "1", "...
0
votes
2answers
67 views

Profiles and Image Formula Fields

I had to create a profile that was significantly more restricted than any of our other profiles. In the process of creating this profile, I have ended up causing an important formula field with an ...
-3
votes
2answers
219 views

is there a function that would remove all special characters from a formula field

I want to remove all special characters from a formula field called "ABC". Is there a way I could use one function that could remove all special characters or do I need to specify each special ...
0
votes
0answers
53 views

How to Use Formula Field to Log Out and then Open a URL?

Background I'm trying to set up a Formula (Text) field with the HYPERLINK function to log a user out of their session and then open an external URL: HYPERLINK("/secur/logout.jsp?retURL=www.google....
0
votes
0answers
39 views

Help with formula field:

Below formula count 1 when statement is true and count 0 when statement is false. I am using this formula to calculate bad data populated being populated in lead object. Output of this formula is ...
2
votes
2answers
45 views

Formula showing Day Of Week and CreatedDate as a Text String

I am trying to create a formula field that will return the Day of the Week concatenated with the date the record was created. The end result should look like this: Tuesday - 8/13/2019 I have this ...
1
vote
2answers
46 views

Formula Field Check Syntax not working

I am trying to check the syntax of the following formula field but it is not displaying any information. When I try to save, it says there are error and to read the message below. When I scroll down ...
1
vote
1answer
46 views

Case Formula Syntax Error

Any ideas on why this returns Missing ")"? Thanks! CASE ( Mission_Aligned__c, "No elements aligned",1, "Few elements aligned",2, "Some elements aligned",3, "Most elements aligned",4, "All elements ...
0
votes
0answers
25 views

Disable Hyperlink on closing form

I have a formula field with a hyperlink that redirects to a aura component with a form,I wanted to know if there is a way to disable the hyperlink for that record when we close the form or when we ...
0
votes
0answers
28 views

Why does the isdtp url parameter dissapear from the url when going from lightning to standard classic functionality

If I create a Button or a formula field to navigate to the reestablish schedules page (for opportunity Line Items), the isdtp parameter dissapears from the url when rendering the Reestablish Schedules ...
0
votes
1answer
28 views

Saleforce If statement Error

Not sure why I am getting the error for having " IF( Payoff_Amount__c - Funding_Amount__c > 0, Payoff_Amount__c - Funding_Amount__c , "None") Error: Incorrect parameter type for function 'IF()...
0
votes
1answer
41 views

Why is the record UI truncating a formula field?

I have a formula field (text) that seems to work as expected. I say this because I pull a report, and the column with the field shows ABC123 XYZ 4567 (not exactly, but that's the gist). Anyway, I'm ...
0
votes
0answers
22 views

Save previous sibling value in new field

I've got a formula that requires me to use the createddate of the previous entry in a field. I think I've determined in order to do this, I need to create a new field (PriorDate) that records this ...
-3
votes
1answer
179 views

Contract End Date Formula

I've been racking my brain for about 8 hours trying to figure out how this formula works, or I guess WHY it works. DATE( Year( Contract_Start_Date__c )+floor((MONTH(Contract_Start_Date__c) + ...
1
vote
1answer
22 views

Formula field to categorize records

I am trying to create a formula which will help categorising customers based on the following conditions. I have created this formula which gives me this error " Error: Incorrect number of parameters ...

1
2
3 4 5
19