• naypers
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

I have created a timecard object to calculate hours for an employee. The employee would submit hours based on Time/Date value entered and what Pay_type (Regular, Stat, Vac, Sick). The formula then sums each pay type. But now I want to TOTAL SUM ALL HOURS but its giving me an "Compiled formula is too big to execute (9,517 characters). Maximum size is 5,000 characters".

Anyone have any suggestion on how to go about decreasing the character size of the formula below OR a better way to TOTAL ALL HOURS.

 

 

IF( ISPICKVAL( Pay_Type_Mon__c , "Regular"), FLOOR ( MOD( End_Time_Monday__c - ($System.OriginDateTime),1) *24) - FLOOR ( MOD( Start_Time_Monday__c - ($System.OriginDateTime),1) *24) -0.5, 0 ) + 
IF ( ISPICKVAL( Pay_Type_Tues__c, "Regular"), FLOOR ( MOD( End_Time_Tuesday__c - ($System.OriginDateTime),1) *24) - FLOOR ( MOD( Start_Time_Tuesday__c - ($System.OriginDateTime),1) *24) -0.5, 0 ) + 
IF ( ISPICKVAL( Pay_Type_Wed__c, "Regular"), FLOOR ( MOD( End_Time_Wednesday__c - ($System.OriginDateTime),1) *24) - FLOOR ( MOD( Start_Time_Wednesday__c - ($System.OriginDateTime),1) *24) -0.5, 0 ) + 
IF ( ISPICKVAL( Pay_Type_Thurs__c , "Regular"), FLOOR ( MOD( End_Time_Thursday__c - ($System.OriginDateTime),1) *24) - FLOOR ( MOD( Start_Time_Thursday__c - ($System.OriginDateTime),1) *24) -0.5, 0 ) + 
IF (ISPICKVAL( Pay_Type_Fri__c, "Regular"), FLOOR ( MOD( End_Time_Friday__c - ($System.OriginDateTime),1) *24) - FLOOR ( MOD( Start_Time_Friday__c - ($System.OriginDateTime),1) *24)-0.5, 0) + 
IF (ISPICKVAL( Pay_Type_Sat__c, "Regular"), FLOOR ( MOD( End_Time_Saturday__c - ($System.OriginDateTime),1) *24) - FLOOR ( MOD( Start_Time_Saturday__c - ($System.OriginDateTime),1) *24)-0.5, 0) + 
IF (ISPICKVAL( Pay_Type_Sun__c, "Regular"), FLOOR ( MOD( End_Time_Sunday__c - ($System.OriginDateTime),1) *24) - FLOOR ( MOD( Start_Time_Sunday__c - ($System.OriginDateTime),1) *24)-0.5, 0)

Hi guys, I really needs help, I want to add the data to my custom object. but, it does not work? I search the answer all over the community. Can anyone help me? I tried using Account as standard controller and it works and when I try my own custom object, it does not work. Do I missed something here?

 

 

<apex:page standardController="GetSatisfaction_Properties__c"  >
    <apex:form >
        <apex:inputField value="{!GetSatisfaction_Properties__c.Community_name__c}" />
        <apex:inputField value="{!GetSatisfaction_Properties__c.Username__c}"/>
        <apex:inputField value="{!GetSatisfaction_Properties__c.Password__c}"/>                    
    </apex:form>            
</apex:page>

 

 

Regards,

Abi Dzar