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 ...

learn more… | top users | synonyms

4
votes
1answer
38 views

Can anyone help with a formula to pull an email address from a text string in a standard field?

I am trying to pull an email address from a text string in the standard "Description" field on Case object. The below formula is correctly pulling everything AFTER the "@" symbol in the email ...
0
votes
1answer
19 views

Validation for close date

IF( ISBLANK( Close_By__c ), TODAY() - Open_Date__c , Close_By__c - Open_Date__c ) When i am using this formula for close date validate. An error is occurring like: Error: Formula result is data ...
1
vote
1answer
42 views

Rollup Summary to Calculate Weighted Average

As a child (master-detail) to my opportunity object, I have a custom object 'Transactions'. Each transaction has its own interest rate, transaction date, and amount. The opportunity has a term (in ...
0
votes
1answer
14 views

Calculating delivery date ranges based on order cut-off times?

We are trying to code the following delivery schedule http://www.fragilistics.co.uk/delivery-schedule into Salesforce, such that if a customer orders an item on Friday, Oct 24th and they're in Area ...
0
votes
0answers
22 views

Are variable length “Auto ID” numbers in formula possible?

In an implementation I am attempting to do, we are attempting to grandfather an existing nomenclature that exists for naming entities within a system. The current numbering system is a fixed 6 ...
0
votes
1answer
21 views

How to match a value in a child record with a parent record field value?

I am trying to create a workflow that allows 2 cross object, custom, picklists to match each other. However, when I create a workflow, there is nowhere for me to add a formula. Not sure if there is a ...
2
votes
1answer
45 views

Is it possible to pull values from other tabs for use in a formula?

Suppose I have two sets of tabs - an accounts tab and a second tab that tracks an entity that has a relationship with the accounts tab (say something like stores for instance). Suppose within this ...
1
vote
2answers
24 views

Dependent Formula Information

For Example - I have a formula that calculates all of my sales by region on an object and then I have a parent object that sums all of my regions sales together. If I have a problem on the Parent ...
3
votes
1answer
85 views

GMT Timezone in formula fields?

I have a field which calculates opendate-closeddate. It is in IST time zone and i need to display in GMT time whenever it is giving a result. Is it Possible to convert date/time from any timezone to ...
2
votes
1answer
98 views

Text formula to return characters between two “.” characters

I'm trying to create a formula field that returns a number. The source of the field is a text value such as the following examples. 0.0.004.0 1.24.004.0 3.336.004.0 4.672.002.0 The goal is to ...
1
vote
0answers
30 views

Running Total at Opportunity Level

I've a roll up summary field at the Account level call "Total Revenue". It rolls up summary of "Revenue" at the opportunity level. I have a request to show total revenue for each opportunity ...
0
votes
2answers
40 views

Formula to combine gender and language

I am looking for a formula which will help me for mass-mailings and marketing-mailings and so on. The salutation depends on the gender and language of the contact. I know that I can do both with the ...
2
votes
3answers
108 views

How can I convert formula to APEX trigger?

I have already exceeded my 5000 compilation code, now I want to create trigger for following formula from custom object. Formula 1 (Custom Field = Package Fee) IF(ISPICKVAL(Package_Option__c,"One ...
1
vote
4answers
232 views

What is wrong with this Formula?

I'm trying to create a workflow to set a Customer Tier (Text) to "A", "B" or "C" depending on the number of employee. The logic should be: C = 1-250 B = 251-500 A = 501+ The result is right for ...
1
vote
3answers
47 views

Can interdependent Rollups, Formulas and Triggers cause hard to reproduce bugs?

Let me try to ask this with out explaining my overly complicated case in detail. I have custom objects that heavily use formulas, rollup summaries and triggers. For the last days I am chasing hard to ...
0
votes
0answers
42 views

How to calculate Calculate max end date inTask Recurrence

I am creating a custom VF page for tasks. In the page one Recurrence field option is available. In this we can give the task a start date and end date. In the end date we can calculate max end date, ...
1
vote
2answers
85 views

Formula for calculating case age excluding weekends and holidays

I need to create a formula field or apex method for calculating case age (from CreatedDate to now) excluding weekends and holidays (as defined in the case's business hours). Is it possible with a ...
1
vote
1answer
34 views

Previous Month Formula

I'm trying to create a formula to check a box if the start date is last month. Not sure what is missing since it is checking the box for all records with a past month. OR( AND(/*Feb - ...
0
votes
1answer
34 views

Why is my workflow not firing? - “100 <> null” evaluates to false? null formula comparison issues?

Question In a workflow formula criteria, what's the expected behavior when comparing nulls with the <> operator? Details I've got a basic workflow that seems like it should fire but ...
0
votes
1answer
47 views

Creating a formula using a picklist and two checkboxes?

I'm looking to create a formula that returns different values depending on whether or not two boxes are checked, but only when a certain picklist value is selected. Meaning if a different picklist ...
2
votes
1answer
30 views

Duration as difference betweed to Datetime fields does not respect Seconds

It seems that Seconds are ignored in formula fields if you create the difference between Datetime/Time fields. Say you have two Datetime fields: End__c and Start__c Take a formula field Duration__c ...
2
votes
3answers
91 views

Loop through textboxes and ruturn one of them

I have three different text boxes(Email, Work Email, and Other Email) to enter email addresses. I created a custom field of type "Formula". I need it to loop through the three email(s) and return one ...
1
vote
1answer
57 views

VF Page Not Found issue with Managed Beta Package

When I am creating an Unmanaged Package and Test it in demo org - It works fine as I required, but when I create Managed Beta of the same package and Install it in Demo org and Test, It does not open ...
0
votes
2answers
35 views

I am having trouble with creating a number range IF formula

I want My formula to show Tier 0 if lifetime account Revenue is between 0 and 999, Tier 1 if Lifetime Account revenue is between 1000 and 10000 and so on. Here is the formula I have: IF ...
1
vote
1answer
30 views

Validation rule assistance

I'm looking for input on how to adjust an existing, working validation rule so that it doesn't fire when the running user is a specific Profile. Here is the existing rule: AND( ...
1
vote
1answer
37 views

Succinct Add Months Formula

Trying to do one but the characters involved mean that further calculations are impacted. Essentially, taking a date field, a months field, to get an end date field. DATE(year(SCD__c)+ ...
2
votes
1answer
57 views

Filtering query based on the value in Formula field

I am trying to filter a query based on a value in the formula field ,which is in hyperlink format .When i try quering the formula field based on its value its not returning any results.Is there any ...
3
votes
1answer
159 views

Formula Ninja to the rescue - Calculate Last Day date of period

In my CustomObject__c I define a time period by those 3 picklist fields: pkl_PeriodType__c { Year, Quarter, Month } pkl_Year__c { 2011, ...,2022 } pkl_Period__c { January, ..., December, Q1, Q2, Q3, ...
0
votes
2answers
38 views

Date & Picklist Fields with Record Type

I want to create a formula for a particular opportunity record type, comparing two date fields and returning one of two variations on a pick list. I've tried variations on the below formula but can't ...
0
votes
2answers
101 views

Access data in Visualforce/Formula fields through Custom Junction Object [duplicate]

I have three custom objects: Entity, Residency, and Address. Entity and Address have a many-to-many relationship; Residency is the junction object (two master-detail relationships.). Is it possible ...
0
votes
1answer
108 views

How to write formula based on pick-list value of the pick-list field

I would like to write a formula to count the number of days based on the conditions mentioned below.. If the Status__c (Picklist field) = Draft, calculate based on Now() - Last modifed date. If the ...
3
votes
1answer
366 views

How to use IF Statement in Formula field for checkbox

I want to copy data from one field in another if checkbox is true, I know I can do it by trigger but I want to do it in formula field, I don't know how to check the checkbox field my code is like this ...
3
votes
0answers
69 views

Can we conditionally render text in a non-Visualforce email template on a picklist?

I'm working on designing an HTML template as a possible workaround to a problem with Visualforce templates refusing to send when triggered from a workflow rule where the ownership changes, and the old ...
1
vote
1answer
27 views

Automatically generate Password using a given formula (Letter of First Name+ drop the zeroCIPSMemberNo+Firstletter of surname)

can anyone please assist me on formulating a correct formula for to automatically generate a password based on this given formula : (Letter of First Name+ drop the zeroCIPSMemberNo+Firstletter of ...
0
votes
2answers
34 views

BLANKVALUE in formula not working

I have a test that is failing and was previously working. I have two decimal fields on a custom object, let us call them Field1__c and Field2__c. I then have Field3__c with a formula. ...
1
vote
1answer
24 views

Having a field linkable like the object name

Basically, on the Account page, I've a related list called 'Rate', which has a field called 'Rate Group' You can click on Rate Group to go to the Rate Group page, but I was wondering if I could make ...
0
votes
3answers
42 views

How to freeze a record once stage value got funded

I have a following validation rule for "need to allow to create opportunities and be able to update opportunities as long as the deal stage is not funded. and do not allow them to change the stage to ...
1
vote
1answer
48 views

How do we calculate the average value of a field in a lookup relationship?

We have a lookup relationship between a meter (parent) and an index (child). We would like to calculate the average of all indexes, and then validate if the entered value of the index is not greater ...
2
votes
0answers
39 views

Is it possible for a popup window to appear after a validation rule returns false?

We need a validation rule to check if a entered value is not twice as large as the average of the last three years. If the validation rule returns false, there should be a popup window displaying the ...
2
votes
2answers
221 views

Calculate days between DateTime field and Now()

I am trying to create a formula in my custom report to show number of days between CUSTOM_FIELD (datetime field) and NOW(). How can I do this?
0
votes
1answer
40 views

How to use this formula in Reports?

I want to display a Case Created Hour,So I've a formula.I want to use this formula in Report. VALUE(MID(TEXT( CreatedDate ),12,2)) + ( DST_Offset__c ) Here DST_Offset__c and CreatedDate are ...
3
votes
2answers
158 views

How does the field type “Auto Number” calculate?

I'm looking for the formula used by Salesforce on Data Type: Auto Number fields. I assumed it was sequential (increases by 1 from the last number generated), but according to our data, it doesn't ...
1
vote
2answers
30 views

Fixing Websites

I made a formula field that takes the website and cuts off the beginning too make it easier to compare websites in reports. The one problem I ran into is if someone puts in a website as example.com ...
2
votes
1answer
52 views

Formula to set value on pick list based on user country

I have a question before using apex to accomplish this. On the Event page layout I'm using a couple of custom fields; Location_Country__c and Location__c. These fields have a field dependency, ...
0
votes
0answers
19 views

Referencing Website Field [duplicate]

I made a formula field that takes the website and cuts off the beginning too make it easier to compare websites in reports. The one problem I ran into is if someone puts in a website as example.com ...
2
votes
3answers
259 views

How to extract the time into a formula field?

I want to extract the time component of CreatedDate (standard field) into a formula field (which should be a string) that contains just the time part. So if CreatedDate is Jan 4, 2014 17:23:10, ...
1
vote
1answer
389 views

Formula to calculate time between two dates, Salesforce example broken

I'm aware the question "How do I calculate the time difference between two date/times?" has been asked a lot, and not just on here. After doing the recommended thing and looking on this page (right ...
2
votes
1answer
58 views

Complete Regex Reference For Salesforce Formulas?

Is there a complete Regex Reference somewhere for using REGEX() in formulas? I have searched and found nothing useful. The problem I am having is below. I want to know if any of the characters ...
1
vote
1answer
90 views

User-defined field dependent on values in picklists, formula needed

I am looking for a solution how to express a formula for an user-defined field with the following description: the formula should show the corresponding letter salutation dependent on the picklist ...
1
vote
1answer
22 views

SalesForce Report, to return contacts who have attended 3+ Campaigns

I really need some help Aim- Only show contacts where they have attended 3 or more campaigns. i have built the following report (see attached image) but i am stuck on how i can return contacts who ...