Questions tagged [formula-field]
A formula field is a field that automatically calculates its value from other fields, expressions, or values.
1,206
questions
0
votes
2
answers
79
views
how to write formula in sf to show percentage
I have a chart showing following information but now i need to have instead of numbers the percentage.
Now it shows percentage of all records. But im interested if its possible to count % separately ...
0
votes
1
answer
70
views
Extract desired text from a field
In my org there is a record on a custom object which on creation populates a URL on a path field : /lightning/r/Account/0012w000019tsbCAAQ/edit
From the above mentioned URL I need the record Id to ...
0
votes
1
answer
90
views
Difference between month calculator in salesforce formula field
I have two dates
startdate : 12/26/2022
enddate : 02-28-2023
if the start date is 1-15th day then the result should be the current month ex: mm-dd-yyyy[12-11-2022] Then December 1st
if the start ...
1
vote
1
answer
70
views
Field Formula for Soonest Date After X Amount of Days
I'm trying to create a couple of fields to calculate the eligibility date for employee benefits.
-The first one should return a date of either the 1st or the 15th of the month 60 days after Hire Date. ...
0
votes
1
answer
41
views
Formula Field Syntax Error
in my custom Activities report type, I need to show which object the activitiy is related to, e.g. lead, account.
Contact or lead activities have an ID in the field WhoId, account, opportunities and ...
-1
votes
1
answer
33
views
How to create a custom field formula to show task owner first name on the task object?
Current formula which is getting an error:
0
votes
1
answer
26
views
What is the proper way to format a formula field so that it is properly spaced
I have a formula field that I created: Career__c + ( FOOO__c ).
I want the output of the field to look like: "Ihsan Singh (12345)", but instead, it is looking like this: Service Field ...
-2
votes
1
answer
41
views
Created formula field based on condition
I have a picklist field Source, When the Source field value is 'Social' then the formula should Concatenate the value using 3 fields
field 1 = work start date - Date type,
field 2 = Emp number - Text ...
0
votes
1
answer
218
views
Custom Field Not Showing Up for Opportunity Product
I would like my sales team to see a custom field — Unit of Measurement (UOM), which is a pick list — for each product when they’re adding it to an opportunity. I have added the UOM field to the ...
1
vote
1
answer
33
views
IF AND statement not returning correct results
I am trying to calculate a Project Health field with the formula below.
IF(
AND(
End_Date__c - TODAY() <= 14,
Percent_Complete__c < 75
),
"At Risk",
IF(
AND(
...
0
votes
1
answer
100
views
Formula Field gives error (Compiled formula is too big to execute (15,366 characters). Maximum size is 15,000 characters (Related field: Formula))
I have created formula field on Lead named CountryScore.
But on saving the formula it is giving error
'Compiled formula is too big to execute (15,366 characters). Maximum size is 15,000 characters (...
0
votes
0
answers
46
views
Formula checkbox does not check when user views record
I created a checkbox formula that checks when ownerid=managerid. As an admin, the checkbox formula field works and updates but when I log in as different user (manager profile) the checkbox is ...
0
votes
1
answer
35
views
Error in a formula with several if
I am trying to create a formula field to display a "clean" value for our revenue. It is a formula based on opportunity fields and it's a field displayed in the opportunity itself.
We have ...
3
votes
1
answer
130
views
Where condition in SOQL using Formula Field is not running
I made a query. there is field formula named Source__c, but when i set value source != 'PT1', the code will give value contact that in source PT1 too.
This is my source__c formula
IF( CONTAINS( Owner....
0
votes
1
answer
97
views
Roll-up summary field of formula fields that returns currency
Documentation it shows that SUM is only available for some types of data. Currency is one of them.
I can't use my formula field to do the SUM of all of them.
That's the structure of my child object.
...
0
votes
1
answer
42
views
Incorrect IF formula : expected 3, received 4
I need to add some lines into a formula and I started it but I'm stopped with the following issue : Incorrect number of parameters for function 'IF()'. Expected 3, received 4. I saw there's another ...
0
votes
0
answers
30
views
FSC Role for Primary Household
We are using FSC with a Person/Household model. On the person, I am trying to do a formula that pulls the role from the Account Contact Relationship to the person Account. Is there any way to do this?
0
votes
1
answer
42
views
Setup a process to update field based on multiple values
Currently, I'm trying to set up a process to calculate Routing Region based on the country field. For example:- if the country equals any of the below values it needs to be tagged as 'Latam'. And we ...
0
votes
1
answer
262
views
Is there way to programmatically obtain URL of File related to sObject?
This is for my pet project.
I have a Candidate object and image from related files should be displayed on it's record page. I know that it is possible to display image using formula field, but for ...
0
votes
2
answers
176
views
Checkbox formula not working
I am trying to select a checkbox if, "Connected" is in the disposition and the call sentiment field does not have "Gatekeeper".
My formula isn't working:
IF(
AND(
CONTAINS(...
0
votes
0
answers
102
views
Displaying Year in the footer of a custom salesforce email template
Question is: How do you display the current year in a Salesforce classic HTML email template? This would be where the copywrite section with the 2022 goes. This way it doesn't have to be manually ...
0
votes
1
answer
39
views
Is there a method for lateral summation (without Apex)?
Our team has created Forecast__c which is a custom object related to the Parent Account of any hierarchy.
Each Parent Account has a Forecast for every month of the account.
So, for example, there is a ...
-1
votes
1
answer
106
views
How to create a formula field which multiplies another formula field with a percent field?
Please help, I need to create a new formula field which should be the multiplication of a formula field by a percent field.
Formula field name is margin% - (Total_T_Price__c - Total_N_ Price__c ) / ...
0
votes
2
answers
1k
views
Formula for calculating number of hours between 2 Date/Time fields
Problem: I am trying to figure out the time in hours it takes for a Lead to be contacted after the Lead record is created
Steps Taken:
1- Created a custom read-only Date/Time field called ...
0
votes
2
answers
102
views
Formula field checkbox [closed]
Hi all I am working on a formula field checkbox such that the checkbox should get checked if the Expiry_date__c of the record is within exactly one month.
IF( ( MONTH( Expiration_Date__c)-MONTH(TODAY )...
-1
votes
1
answer
111
views
Getting an error : The formula expression is invalid: Incorrect parameter type for function 'OR()'. Expected Boolean, received Text
I am getting an error on the flow that is look for one with value in picklist as = Prime Contractor other being if there is no account associated with it. Should I be changing the ISBLANK to a ...
0
votes
1
answer
40
views
Need to create a formula field
I need to create a formula field which returns the date when the status (picklist) field is marked as complete.
I have tried below formula but it is updating today's date for all the ones which were ...
1
vote
1
answer
30
views
Salesforce Custom Button to launch Javascript prints Date in decimal value [duplicate]
I am trying to compare dates in custom button which executes JavaScript when clicked. The date values are printed as decimal value which makes it difficult to compare. Any suggestions whats happening ...
0
votes
1
answer
165
views
Warning Error when encoding row-level formula: Formula result is data type (Boolean), incompatible with expected data type (Number)
I am trying to create a formula to output either true/false or 1/0 if field Salesloft_Cadence contains the text "EMEA" I get the following error message. Suggestions?
CONTAINS(Activity....
0
votes
0
answers
86
views
HYPERLINK formula field for related list
I want to create a HYPERLINK formula field on a Custom object to navigate to the File related list
i.e. To navigate to the list view of all the Attachments attached over the custom object
This is the ...
0
votes
1
answer
58
views
In hyperlink formula field custom label is not fetching the value - salesforce
Syntax of hyperlink formula is -
HYPERLINK("URL," "Display Text," "_self")
I am using following formula for hyperlink in formula field.
HYPERLINK('/apex/...
-1
votes
1
answer
330
views
Formula field - Trying to show a flag if checkbox = true
I am trying to create a formula to show a red flag if a checkbox field is set to True
This is the current formula
(IF("Response Timer Failed" = TRUE, IMAGE("/img/samples/color_red.gif&...
0
votes
1
answer
755
views
IF-ELSE Formula Field
I want to use formula field, if the InstallDate is blank then formula field should be empty. But when InstallDate is empty formula shows me '--'. Can somebody look at my code? :)
IF( Account....
1
vote
2
answers
389
views
Display a Qr code ( an image formula field) in a VisualForce page
I have a requirement where I want to display a Qr code related to a record in a visualforce page in order to generate a PDF . I have managed to generate the pdf , howver , The Qr code is not displayed ...
1
vote
1
answer
281
views
Formula Field to calculate conversion rate of one stage over another stage in contact object in reports
My requirement is I have a custom picklist field in the Contact object name stage, like MQL(Mkt qualified Leads and DQ(Disqualified leads) SQL(Sales Qualified Leads) Now I would like to calculate and ...
0
votes
0
answers
37
views
Error: Compiled formula is too big to execute
Currently I have a formula consisting of various fields where each of the field itself is a formula. This results in a formula is too big to compile error. I am wondering if there are any ways ...
0
votes
1
answer
326
views
How do I create a formula field that displays a text corresponding to a percentage score in another field
Currently, I have fields that have percentage values
For instance, my communication score field that is scored based on a series of questions and has the formula
I want to change the string in my ...
0
votes
0
answers
75
views
How to create (formula?) field in Account that pulls through a field from Duplicate Record Set object
I have a Roll-Up Summary field that I created in my Duplicate Record Set object that returns a Date, and I'm trying to create a field on the Account object that returns the value of that Roll-Up ...
0
votes
1
answer
99
views
Getting syntax error in formula field salesforce
When I'm trying to perform a calculation in a formula field(Number) in salesforce,
I'm getting an syntax error.
IF(
((Forecast_Tons__c – Minimum_Range_Value__c) * Applied_Benefits__c) < 0,
...
0
votes
2
answers
155
views
Issues using colon for OR in contains formula
I am trying to check our state and country fields to make sure they are being entered correctly from an integration and get a notification if a state or country is incorrect. However, the Contains ...
1
vote
2
answers
372
views
Salesforce URL Formula Field Issue - Seems simple to fix, but who knows
I'm working on a Salesforce coding issue. Let me preface this by saying I'm not a developer or Salesforce expert. But I've identified an issue, that can be resolved if we can figure out how to
recode ...
1
vote
1
answer
30
views
Render Images from Formula - Not Image address
This formula is doing everything that I want except showing the actual Image on the field. Instead it shows the image address.
IF( AND(ISPICKVAL(Asset.LBS__c, 'Active'),ISPICKVAL(Asset.Swap__c, '...
-1
votes
2
answers
63
views
Help with IF function on a formula field -
I have a feeling my parentheses are out of alignment or I need a NOT somewhere for this formula field. I have tried a few different syntaxes with no success. Error message: "Incorrect number of ...
0
votes
2
answers
265
views
Formula for showing flags based on a number field
am fairly new to Salesforce and do not come from a technical background so struggling with Formulas. I am trying to achieve the following logic; If the NPG Triage Result Code is 5, 7, 9, 21, 99 then ...
0
votes
2
answers
96
views
I have a custom formula field which converts a date field to text. Additionally i want it to only convert the date field to text based on Account type
Currently I am using the below formula in my formula field to convert a date field to string :
IF(ISBLANK( Fiscal_Year End _c),
NULL,
TEXT(DAY(Fiscal_Year End _c )) & ""&
...
0
votes
1
answer
60
views
Formula field based on data input [closed]
I need a formula field which I want to show percent completed based on how many fields have been updated.
So let's say I have fields A, B, C, D and our SDR has only updated three of the four fields, I ...
0
votes
1
answer
97
views
Hierarchy Custom Setting default value in Formula field taking the old value into calculation
I have a hierarchical custom setting called Test_Custom_Setting__c and I have field in there called Time_Delay__c set to the default value of 5 and also the Organizational defaults for this field is ...
0
votes
1
answer
460
views
How do I use a formula text field to display in a record whether a candidate has been approved or not, based off a checkbox?
I have a checkbox field named "Approval" that is checked and not checked when creating a candidate record to see if they have been approved. What I'm trying to do is create a formula text ...
0
votes
1
answer
502
views
Flow Formula Field
How can I update a picklist status value to Inactive when a record has passed 31 days After Job End date?
I have a scheduled flow setup on weekly basis and it should check all Active records and ...
-1
votes
1
answer
75
views
Trying to create a formula for showing a flag on a field but my forumla keeps showing Error: Syntax error. Missing ')'
I am trying to create a formula, this is the on I am working on.
The first IF statement is working OK but the other two are not. The logic required is;
Additional Formula : Existing formula + Yellow ...