Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [formula-field]

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

0
votes
0answers
7 views

Create current location automatic without coding

I just created customer object with customer name field ,now i want the latitude and longitude to auto update when customer name is update HOW? (is it possible without the coding)
1
vote
1answer
32 views

Check box field on Parent object based on child object record type

I am trying to create a checkbox formula field on Account object. This is to be checked based on the record type and isactive field in another object (say Rel__c Object). These two objects have a ...
-1
votes
0answers
26 views

Formula to update a field based on the checkboxes?

I have four checkboxes, A B C and D. If I check A it updates the alphabet field to A. If i check B it updates the alphabet field to B. If i check more than two alphabet checkboxes, it updates the ...
0
votes
1answer
45 views

Formula field doesn't retain old values in the trigger

I have scenario 1 - A formula field on Account (custom_type__c) which references the Contact's email as - Primary_Contact__r.Email Whenever Primary Contact's email id is changed , Custom Type is ...
0
votes
0answers
40 views

Days in this month and days in this year formulas

I have a formulas of days in this month and this year with start and finish dates. My formula counts the number of days in this month/year that fall in a given interval (between Start Date and Close ...
-2
votes
2answers
55 views

How can I simplify the formula to avoid limit?

I'm getting "Maximum size is 5,000 characters" for formula, when trying to do this: ((Account.Cost_per_day__c + IF( (AND(Cleaning__c = TRUE, Parking__c = TRUE)), (VALUE(TEXT(Number_of_cleaning__c)...
0
votes
0answers
18 views

How to get the Price book price of the Product to a custom field (formula)?

I want to create a Formula Field in the Object Product2 that will store the List Price of the Product stored in the Standard Price Book. How can I do that ? In the Formula I can't reference the Price ...
1
vote
2answers
171 views

The number of days until the end of the month

For example, I have Start Date 29.05.2019, and Finish Date 4.06.2019. I have a formula field which displays 6 days between these 2 dates. But how can I count the number of days from Start Date until ...
0
votes
1answer
19 views

Formula to capture 5 letters on contact name

I was wondering if it is possible to capture 5 letters off of a contacts full name based on its sequence? for example: eg. Surname Jolie-Pitt, First Name An gie Result: OLENG Non-alphabetic ...
1
vote
1answer
23 views

formula field to display images when the status of the picklist is changed

IMAGE( IF(ISPICKVAL(Flat_Status__c, "Booked"), "img/msg_icons/confirm32.png", IF(ISPICKVAL(Flat_Status__c, "Sold"), "img/msg_icons/error32.png", IF(ISPICKVAL(Flat_Status__c, "Non-...
0
votes
1answer
16 views

comparing DateTime value in formula

I am trying to create a formula field to set a DateTime value, but it fails with the following error: Error: Incorrect parameter type for function 'IF()'. Expected Number, received DateTime The ...
1
vote
1answer
26 views

Using Flow but need Complex equation to set a value

I'm using a flow to do a nightly (1am) job. This job sets a Boolean to false if it is true and to true if the Next Email Date is Today(). I need to use this job to also set the Next email date for ...
0
votes
0answers
62 views

Inserting record on Junction object with formula fields

I have Junction object called Agreement Scope which has two Master Detail relationships with Account and Agreement. We are assigning Account and Agreement in the lightning components Apex Controller ...
0
votes
3answers
19 views

Account Name not displaying

I created this formula field to display a hyperlink to the direct parent account on whatever record a user is viewing. For some reason the link displays the account Id number and not the actual name ...
0
votes
2answers
57 views

The formula expression is invalid: Syntax error. Missing ')' Help Please

When trying to save the below formula I get this error: The formula expression is invalid: Syntax error. Missing ')' Help Please Why do I get this error? How can I fix it? AND( IF ( ...
0
votes
1answer
32 views

How to write formula field that returns a percentage to show amount at or below 100%

Your input is appreciated, I'm creating a formula field called consumption is a result of dividing two numeric fields (Modified Usage, and Range) that will return a percentage of usage for example. If ...
0
votes
1answer
67 views

Trigger workflow rule on formula value change

I am doing some mockup exams for the certification. There is a question saying: An sObject named Application__c has a lookup relationship to another sObject named Position__c. Both Application__c ...
-1
votes
1answer
63 views

Data not visible on formula field on Object Detail page

I have created a formula field on an object (Object_A__c) which needs to get the data from another Object (Object_B__c). The relationship is such that both objects A and B have lookup relationship ...
0
votes
1answer
34 views

How to send a reminder 45 days before the event -— formula field does not trigger the process builder

I have created a custom object "Assigned tasks" that works like tasks such that it has due date, subject, priority e.t.c. This custom object "Assigned tasks" is a child object to case object. Case ...
0
votes
1answer
32 views

Formula field used to check if info on related object is being completed

I have the following formula field in a custom object, which is being used to tell me if the address in the related object is being populated. It stopped working. Its supposed to be unchecked if the ...
0
votes
1answer
23 views

Error: Syntax error. On Custom Field

I have the following formula for a Checkbox in Salesforce and it keeps giving me the following error. I am trying to have this box check if "Trip A (or B), 2 Weeks, 1 Week or 3 Days is true along ...
0
votes
1answer
19 views

How to use an external API in formula field

I'm trying to create a formula field wich use an external API in one of my object. I'm trying to GET the number of followers of an instagram account directly in the formula field. To do that, I ...
0
votes
1answer
11 views

Picklist Text to Numerical Value

I am putting together an evaluation form in Salesforce. I am using Customer object Greeting__c, the pick list values are High, Met, Below. I would like to assign a formula that sets "High" to ...
0
votes
1answer
18 views

How to extract date value from a text field with inconsistent values

I have a field called Invoice_Sent_Date_Text__c that has values like: Sent [11/30/2018] Billed as Package; Sent [1/28/19] Sent [3/6/19] 3/6/19 I need to create a field that will isolate and ...
0
votes
1answer
42 views

Help needed with creating a New formula field

I am having an issue with a validation on a field in my Case object.I have the below requirement.Can somebody help? The Field should allow only a total 11 digits. These 11 digits can be divided into ...
1
vote
0answers
15 views

Can some explain below formula of excluding weekends counting

Can some explain below formula of excluding weekends counting, I want the explanation I'm not able to understand the below formula. The formula is : CASE(MOD( ActivityDate - DATE(1985,6,24),7), ...
2
votes
1answer
32 views

In process builder, how do I write a formula to set a relative day but a specific time?

In this example, let's say a new account is created and we want to have a kickoff lunch with that new account. I'm setting up my logic in process builder using a Start Date Time set to... ...
2
votes
1answer
134 views

Error in a formula field

I have a requirement where I need to populate records where a criteria is true. The criteria is the users must have joined in between Jul,2018 to May,2019. I thought I can achieve this using a ...
0
votes
0answers
21 views

Time Spent field has negative value even if Start Time field value is less than End Time (Only happening for few records, working fine for the rest)

I have three fields - Start_Time__c(Date/Time), End_Time__c(Date/Time), Time_Spent__c(Formula(Number)). The field Time_Spent__c calculates time difference of Start_Time__c and End_Time__c in hours (...
0
votes
0answers
21 views

Reduce Formula Size (Case)

I want to create a formula (text) that combines (parts) of two fields in some scenarios. Example: If the 'BillingPostalCode__c' starts with 90 and the first 9 characters of the '...
0
votes
1answer
67 views

Refresh standard page in Lightning Experience

I have a formula data field on an object which is not reflecting updated values when viewing it in Lightning. This is directly related to the known issue https://success.salesforce.com/issues_view?id=...
0
votes
1answer
18 views

Are two blank fields considered equal in a Salesforce formula?

Writing a Salesforce formula and my if statement is comparing whether two fields are equal to one another (ie. Field1 == Field2). However it appears to evaluate them as false if both the fields are ...
0
votes
1answer
16 views

Salesforce matrix report

Hi I am trying to create a salesforce report to show the 3 columns Contact owner number of contacts per owner whether contacts have any activity on them or not(sum of relation) My report looks ...
1
vote
1answer
98 views

IF statements in formula field or process builder

I need a formula field that essentially has two different formulas depending on which product is selected on the Opp Product. Both products and formulas will be needed, so it's not really an IF/ELSE ...
0
votes
0answers
35 views

Lightning Experience Formula Field With Old Value

I've "A" object with two fields: a lookup field (object B) and a formula field (field status of object b) and a "B" object with lookup field to "A" object. In lightning experience I open record "A" ...
0
votes
0answers
15 views

Formula field in a Predefined Field Value (Email)

I have a record, namely Quote, which has a lookup relationship with Contact. Now, I'm creating an Email tab under the Activity, and I want the fields (To, From, Subject, etc..) to be auto-populated. ...
1
vote
1answer
66 views

How to handle MOD returning a negative number?

I discovered today that Salesforce's MOD function (in formulae and workflows) will return a negative value if given a negative input. MOD(-5, 12) = -5 This goes against the mathematical definition ...
0
votes
1answer
29 views

Error in return type

I have written a formula field of data type DATETIME and return type text IF((ISPICKVAL(Status, 'Completed')),NOW(),'') but error occurred states Error: Incorrect parameter type for function '...
1
vote
1answer
46 views

Formula field to calculate the percentage of days remaining

I have a custom formula field where I need to calculate the amount of days in the year * 100 \ 365 = % of days remaining. I've created the following formula: ROUND((365 - (CloseDate - DATE(YEAR(...
0
votes
1answer
42 views

“Attempt to de-reference a null object” for formula field in map

I am trying to get the value of formula field to check in condition via customAccMap. i am checking if formula_field__c is null then i need to throw a cpqException. But on Add Product Page on CPQ i am ...
0
votes
1answer
19 views

Error while creating formula field

There is field : "Company Identifier "on Company object. Which having lookup relation with Item Object. Now i am creating formula field on Item object with the below condition If Company ...
0
votes
1answer
100 views

Sum of opportunity amount on account records [duplicate]

I have one field that calculates last year's sum of donation amount using a managed package. My requirement is to create a new field on Account object to calculate sum of total opportunity amount from ...
1
vote
2answers
71 views

Possible to view all formulas of formula fields on an object?

Getting this error: " This record could not be loaded because it includes too many formula fields with complex formulas, or too many custom fields. Ask your Salesforce administrator to remove some ...
0
votes
1answer
36 views

Formula that uses IF statements not working

I am trying to use a formula field on the Campaign Member object to pull from either a Lead or Contact. The Formula Text field works but the Formula Number field does not, and I am not sure why. So ...
0
votes
1answer
18 views

Average of orders placed by an user

I have a requirement where I need to get the average number of Users who are placing orders each month. If I get the count using Roll up summary field, it will be the copmplete count of the year and I ...
0
votes
1answer
68 views

SFDC formula field to convert decimal number to hex string

I'm looking to convert an auto-number field value to a hex string formula field. My auto-number is not going to be larger than 999,999. I found some suggestions on the net (thanks Chris Gary) and ...
1
vote
1answer
37 views

Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,459 characters). Maximum size is 5,000 characters

I have a Formula Field(Time_Spent_Technology_Setup_Number__c) to stop calculating time based on the Status. Whenever i am trying to save the field it is throwing below error: (In the logic I am not ...
0
votes
1answer
94 views

Get full length decimal value of a managed field with decimal places set to 2

I have a Managed field Number(16, 2) of which number of decimal places cannot be edited. For Example, if I enter 1.2391276549 into that field, It is displayed as 1.24 (as we know that salesforce ...
1
vote
1answer
37 views

How to get level change date

I have a field on Account named Level. It contains values viz., Manager, Assistant Manager, etc. I need to retrieve accounts with their level in Jan 2017 and Dec2018. How to get the data. I tried ...
2
votes
2answers
89 views

Multiple Checkboxes in Formula Field

I'm sorry if the title is completely butchering what I'm looking for, please let me know if should be updated. Here's what I'm struggling with: I have 11 checkboxes on an opp layout. I need the ...