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 ...
1
vote
1answer
29 views
How to give formula field dynamically in Visual force, I am using PE in salesforce
when I save the below formula, it shows this error:
Error: Compiled formula is too big to execute (19,959 characters). Maximum size is 5,000 character
if the sum of Value_1__c to Value_13__c <= ...
1
vote
2answers
32 views
General question about triggers and formulas
I have a very general question about the data flow when dealing with formula fields and triggers - I'm writing a trigger that will update a text field on Contact objects whenever the parent Account is ...
2
votes
1answer
22 views
Case Field: what hour was a case opened - Time zone & daylight savings time sensitive
So using this formula I can get the Hour in GMT that the case was opened
VALUE(MID (TEXT ( CreatedDate), 12, 2))
However, we have users who are across the country. When a user views the report they ...
0
votes
2answers
29 views
How to do a not in set comparison in Visual Force formula?
Question
Given a value, how can I cleanly compare that it is not equal to a set of values in a visualforce formula?
Background
I'm building an email related list component driven by a field set. ...
2
votes
1answer
20 views
How to use formula to transform text to integer?
I want to use a dropdown list for attributing values to a field. However, for the end user, I want to show easy labes instead of numbers.
I wonder how I can set up a formula to transform that text ...
2
votes
3answers
65 views
Implementing a form in Salesforce
I am currently the Salesforce administrator of a company Enterprise account. Our accounts are made up of universities. I was asked to implement a form for trips.
The trips basic information is: Trip ...
2
votes
1answer
32 views
Formula based on picklist
I am trying to create a formula that will put a 1 in a hidden field if the value of a picklist is equal to a specific value. I keep getting stuck here and I can't figure out what I am missing?
...
1
vote
1answer
18 views
How to create formula with choices list?
I want to create a priorization system within my opportunities. It should be a field showing the output of amount * probability * boost-factor. Boost factor is supposed to be a gut feeling about the ...
2
votes
1answer
38 views
Auto-populate Month, Year and Quarter formula fields based on the Closed Date field
There is a object Name "Opportunity" in which there is 4 fields mention below
Closed Date, Month, Year, Quarter.
Now As i fill the date manually , Once i click on "Save" the remaining field i.e ...
1
vote
1answer
31 views
Help with Formula in validation rules
I have couple of custom fields
Tuser_c Checkbox
Tdate_c Date
I want to have the tdate field to be required if the Tuser is true
AND( $User.Tuser__c ,ISNULL( $User.Tdate__c ))
This doesnt fire the ...
0
votes
1answer
53 views
Create new field based on data from spreadsheet?
I'd like to create a new field for Account objects in Salesforce which is filled based on if the Account Name matches one of the names on a spreadsheet that I have. So I basically want to have a giant ...
2
votes
2answers
62 views
How do we get user's time zone offset integer in Apex or Formula Field?
How do we get user's time zone offset integer in Apex or Formula Field?
For example, a user's personal information time zone
(GMT-04:00) Eastern Daylight Time (America/New_York)
should return -4.
...
3
votes
1answer
81 views
Use value of formula field in conditional
I am trying to take the value of the ACT_Superscore__c formula field and use it in a CASE statement in another formula field:
CASE( ACT_Superscore__c ,
36, 1600,
35, 1560,
34, 1510,
33, 1460,
32, ...
4
votes
2answers
55 views
Values of formula fields using NOW() and TODAY() actually stored in the database?
Just for the sake of argument, if I had the following formula field:
MyObject__c.FormulaField__c = DAY(TODAY())
What is the actual value of this field stored in the database, will the value ...
3
votes
2answers
45 views
Formula for a workflow rule
I'd like to have a workflow rule fire when a record is owned by queue A and then changes owner.
What I have so far is:
AND(
ISCHANGED(OwnerId),
PRIORVALUE(OwnerId) = 'QueueId'
)
I've tried both ...
4
votes
1answer
37 views
Is is possible to have an automatic width or height on a photo in an image formula?
We have a photo image formula field thats showing student photos, using the technique found here:
http://assets.salesforce.com/pdf/getting_started_with_images_v1.pdf
the problem is that not all the ...
2
votes
2answers
52 views
Reverse an arbitrary text in a formula
I'd like to reverse a text field in a formula:
abc -> cba
word -> drow
Is there a way to do that for a text of arbitrary length?
2
votes
2answers
69 views
How can I get the date of the last day of current fiscal year in a formula?
I need to calculate the days between today and the end of the fiscal year. I found some examples in Apex using Period sObject but was wondering if there's a way of getting this in a formula, since it ...
2
votes
1answer
93 views
Custom Button to open Packaged Page with Parameters
I have a managed/packaged visual force page DetailPage and I want a custom button on MasterPage to open it with parameters (the Id of the master record).
What doesn't work:
Creating a CustomButton ...
2
votes
1answer
98 views
URLFOR for list view buttons?
Issue
How can I redirect a user to a custom list view button with a specific set of records? Was hoping for something like this
{!URLFOR($Action.Account.List_View_Button, accountIds)}
Background
...
2
votes
1answer
128 views
Time Zone (and Daylight Savings) calculations (to a Text field)
In the below formula code, we have to alter the -4 or -5 values each time we enter or leave Daylight Savings time due to the fact that SF, when pulling the Text version of the Time, does it in GMT (or ...
2
votes
2answers
54 views
Extracting number values in a text field then summing up
I have this field that gets populated by an external service and I want to extract the number values from it then sum the numbers up.
For instance, see the text below
United Kingdom: 3, Ireland: 1, ...
2
votes
2answers
81 views
Increment number field by 1 on a daily basis
We're looking to auto increment a number value field on Cases by 1 for every day the case has been open (i.e. auto-increment as long as the case is not closed).
What would be the best way to go about ...
0
votes
0answers
32 views
A workaround to bucket the Converted Amount field?
I need to bucket the Converted Amount field.
It is currently not available with SF, and there is a SF Idea on it. But I want to try and have a workaround.
I think of having a formula field, that ...
2
votes
1answer
101 views
Formula Field to Count Records in Lookup Relationshp
I want to count the number of child objects in a lookup (not master-detail) relationship. Since no rollup-summary (COUNT) fields are supported I thought I would do this:
...
3
votes
1answer
240 views
Formula fields and trigger
I am struck with a nasty situation : I will try to explain this as clear as possible.
I have 2 fields
A & B
B = B + A
when I change A(input field) I want to include the formula's new value ...
2
votes
1answer
25 views
Can YEAR() be used to with a DATETIME as it can with DATE [e.g. YEAR(Datetime__c)]
SFDC Documentations tells me YEAR "Returns the year component of a Datetime in the local time zone of the context user".
...
3
votes
1answer
57 views
Can the User's Last Login date be used in a formula?
I need to calculate the LastLoginDate - Created Date of Users in a formula field. The Last Login Date field is not available here.. Is there a way to get it without having to write code/SOQL?
2
votes
2answers
80 views
Formula to get the start date of the week
Is there a way we can use a function like .tostartofweek() in formulas.
In short if the user enters date as 02/26/2013 i want the formula to get the entry_date.tostartofweek() in formula field
Any ...
3
votes
2answers
111 views
ISBLANK vs ISNULL
I am just wondering what could be differences between ISBLANK and ISNULL. I found following link http://shivasoft.in/blog/salesforce/salesforce-interview-questions-%E2%80%93-part-2/
But I think ...
3
votes
2answers
74 views
BR() tag in default value formula of a text area (long) field not working
I have a text area (long) field. It contains the default value "Text1" & BR() & "Text2".
It never renders the br() tag correctly, the final result is always 'text1 BR() text2'. Field type ...
4
votes
1answer
65 views
Formula to display the current week
Is there a formula to display the calendar week
I want to display the following for the 2nd week of FEB,2013
eg: 02/10/2013 to 02/16/2013
and for 3rd as :
02/17/2013 to 02/23/2013
I want to ...
2
votes
1answer
44 views
Can i create a formula field to calculate the time in business hours between Case created date to now/Closed date?
Can i create a formula field to calculate the time in business hours between Case created date to now/Closed date? I'm looking for a non code solution which is equivalent to finding the difference ...
3
votes
2answers
74 views
How do I detect a namespace prefix in a web tab formula?
I have a managed package that contains a legacy web tab that now needs some more advanced logic to be added to the destination. This all but requires the tab to now point to a visualforce page.
...
1
vote
1answer
65 views
High Volume Portal User Custom Field on Formula Field
I have created a custom field on the User Object - Canvas_Id__c ... This value is only populated when the user is a high volume portal seat user.
I have a custom object Student Task where I want to ...
3
votes
1answer
154 views
Hyperlink in help text which comes from XML
I have some XML where the link and video of a particular tab are placed. My requirement is when I click on a tabsection of a tab, helptext should be displayed next to it, and when I mouseover it, ...
0
votes
1answer
27 views
Creating a custom “Developer API Name” field on a custom object
I need to have a field that takes the text value of another field, and creates a developer API name out of it.
Ie.
Object__c.Name = 'FAQ: How to use salesforce?' gives Object__c.APIName__c = ...
2
votes
1answer
84 views
How to write an auto-incrementing ID that starts from 0 every month?
Say I have an invoice object that has an internal unique ID and should get another invoice ID.
The format of the invoice ID should be: YY-MM-# where # increases with every invoice generated.
How can ...
2
votes
1answer
136 views
Report Formula - Percentage per row per column (not entire table)
I cannot find ANY help with what proper references to use for this. If my report has only one column to the matrix (first screenshot), the following Formula works to product percentages per row in ...
2
votes
1answer
68 views
Can I reference permissions in Validation Rule formula?
I'm trying to cut down on the number of profiles in one of my Orgs. One way we're using profiles is to enforce business rules, like "Only a ZZZ user may close opportunities as won," which we do by ...
2
votes
1answer
154 views
Calculating Turnaround Time in Date Fields
Does anyone know if there is a formula to calculate the turnaround time between 2 date fields and exclude weekend days?
Ex: Case opened 11/30/12, case closed 12/4/12 - how many days did it take to ...
0
votes
1answer
66 views
Add date and text fields in formula?
I'm having a text field say text = 20 and a datefield say date=12/04/2012(here date is always system.today's date). now I want to add both the fields and the result should be 12/24/2012.... How would ...
1
vote
2answers
158 views
Error: Formula result is data type (Date), incompatible with expected data type (Number)
I wanted to have a formula field with difference between a datefield and todays date.
The formula field is a number to store the no of days.
The formula that i have is
TODAY() - SDate__c
SDate__c ...
2
votes
1answer
160 views
decimal places and text() formula
When I use the text formula, salesforce doesn't respect my decimal place formatting. For example,
Field A has 4 places to the right of the decimal. It shows up nicely on the page as
0.4000
If I'm ...
0
votes
0answers
160 views
Default a Date field to FISCAL YEAR start/end when a record is created without using Apex triggers
I need to set a Date field on an object to the organization's Fiscal Year's Start Date. This could be a formula field, but ideally it would be just a Date field so that the value could be modified if ...
5
votes
4answers
496 views
Unexpected behavior with ISBLANK and CONTAINS functions in Visualforce Page
I've reduced my issue to the following example:
<apex:page >
<apex:variable var="blank" value="" />
<p> Contains(blank, 'foo'): <apex:outputText value="'TRUE'" ...
3
votes
2answers
338 views
Formula field for the Difference between 2 time values
I am trying to write a formula field that calculates the difference between 2 time values. The time inputs are picklist values that are in the format h:mm aa some valid values are
12:00 AM
9:30 AM
...
1
vote
2answers
106 views
How do i specify a formula field in task to display mobile
I want to show a mobile on the tasks. So i thought of creating a formula field on tasks, But i am not sure on how do i set the formula as the task could be related to a contact or lead.
How do i set ...
1
vote
2answers
243 views
Report that groups same record on 2 date fields?
I've been asked to assist with creation of a summary / matrix report.
We have a custom object Service__c that holds all the gravy technical details of closed won Opportunities. There are 2 date ...
3
votes
2answers
101 views
Mobile field on Task object
I want to configure task object under Activity. I need to add a field mobile in to task object. I need to show the field on the task page and on the reminder window. For this I try to create a new ...


