Formulas & Validation Rules

student_board_formula_solution_80802_1920x1080

Validation Rule for Case not closed in Queue:

AND(
NOT(ISBLANK(Owner:Queue.Id)),
ISPICKVAL(Status, "Closed")
)

 Calculate the end date of the month Based on the start date of the month:

DATE(
YEAR(Start_date__c),
MONTH(Start_date__c),
CASE( MONTH(Start_date__c),
1, 31,
2, IF( MOD( YEAR(Start_date__c), 4) = 0, 29, 28),
3, 31,
4, 30,
5, 31,
6, 30,
7, 31,
8, 31,
9, 30,
10, 31,
11, 30,
12, 31,
0
)
)

Calculate Total hours from Date:

TEXT(
FLOOR(Current_Time__c - CreatedDate) *24
) & " Hours "

Calculate Date, Minutes, Hours:

TEXT(
FLOOR(Current_Time__c - CreatedDate)
) & " Days " &
TEXT(
ROUND(MOD((Current_Time__c - CreatedDate)*24,24),0)
) &" Hours " &
TEXT(
ROUND(MOD((Current_Time__c- CreatedDate)*1440,60),0)
) &" Minutes "

Merge five picklist field values into one formula field:

SUBSTITUTE(
IF(ISBLANK(TEXT(Picklist_1__c)), NULL, TEXT(Picklist_1__c)+ ", ")+
IF(ISBLANK(TEXT(Picklist_2__c)), NULL, TEXT(Picklist_2__c)+ ", ")+
IF(ISBLANK(TEXT(Picklist_3__c)), NULL, TEXT(Picklist_3__c)+ ", ")+
IF(ISBLANK(TEXT(Picklist_4__c)), NULL, TEXT(Picklist_4__c)+ ", ")+
IF(ISBLANK(TEXT(Picklist_5__c)), NULL, TEXT(Picklist_5__c)+ ", ") + ".",
", .",
NULL
)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s