Skip to main content
I'm having trouble trying to write a validation rule that only allows inputing of whole numbers or .5 for a decimal (it's a time sheet, and we only do whole or half hours).

 

I also need this to evaluate multiple fields. Can I do this in one rule or do I need multiple? I tried use 

 

MOD( Agreement_Hours_OT__c, .5)

 

but it didn't like the decimal. 
9 respuestas
  1. 14 sept 2016, 12:52
    Hi Megan,

     

    You can simply write as below

    AND(

    NOT(ISBLANK(Agreement_Hours_OT__c)),

    MOD(Agreement_Hours_OT__c * 2, 1) <> 0

    )

    or

     

    you can just check the last 2 characters of the value entered into the Agrrement hours field

    AND(

    NOT(ISBLANK(Agreement_Hours_OT__c)),

    RIGHT(TEXT(Agreement_Hours_OT__c), 2) <> ".5"

    )

     

     
0/9000