Saturday, August 25, 2012

Interesting Formulas III:

Interesting Formulas III:
A formula is an algorithm  that derives its value from other fields,expressions or values.
Formulas are used in Custom fields,Default field values,Validation rules,Filter criteria,Field updates,Custom summary formulas,Custom buttons and links ,Visualforce pages.One of cool formula is image ,it is easy to identify on list views or reports.For example
Review Status:
IMAGE( CASE( Status__c , "Sent","/img/samples/flag_green.gif", "Received","/img/samples/flag_yellow.gif","Accepted","/img/samples/light_green.gif","Declined","/img/samples/flag_red.gif","/s.gif") , "Review Status" )

Number of days case open:
IF(IsClosed,null,now()-closeddate)
Lost Opportunities must include reason lost:
AND(ISPICKVAL(Stage,"Closed Lost"),ISBLANK(Reason_Lost__c)
Closed Amount Cannot be changed:
AND(IsClosed,ISCHANGED(Amount))
Report Case Status:
CASE( Status , "New"," Open","On Hold", "Open","Researching","Open","Escalated to Management","Escalated","Escalated to Tier 2","Escalated","Closed")
Candidate Summary:
Candidate__r.First_Name__c &" "& Candidate__r.Last_Name__c &BR()& Candidate__r.Phone__c &BR()& TEXT(Candidate__r.Education__c )&BR()
Growth Percentage for closed opportunities :
(AMOUNT:SUM-PREVGROUPVAL(AMOUNT:SUM, CLOSE_MONTH))/PREVGROUPVAL(AMOUNT:SUM, CLOSE_MONTH)
Vlookup Usage:
AND(VLOOKUP($ObjectType.Zip_Code__c.Fields.State__c, $ObjectType.Zip_Code__c.Fields.Name, LEFT( Zip_Postal_Code__c ,5) ) <> State_Province__c, NOT(Batch_Load_Item__c) )





No comments:

Post a Comment