+ Start a Discussion

Checkbox true then +15 to a number field...help please

Can somebody explain how to write a validation rule to add 15 to a number field if a checkbox is check?

Thanks in advance.
Do you mean Workflow Rule and field update. A validation rule would prevent the record from being saved unless the data was entered manually to meet the criteria.

Are you familiar with workflow rules?

Thanks for responding.

Unfortunately, we have the professional edition...no workflows...

We have a support timecard which currently displays the minutes remaining (minutes sold - minutes used).  This is working great.  However we have another scenario which is also recorded on the timecard.  If this service is provided the user currently has to add another 15 minutes to the minutes used field.

Ideally we'd like our users to only have to tick a checkbox (when they provide the additional service) and 15 minutes is deducted from the minutes sold field allowing for a more accurate display of the minutes used item.  

So if the checkbox is true then we want to add 15 minutes to a number field which we would then subtract that amount from the minutes sold field. (we'd prefer to add it to a number field first before subtracting so we could tally that amount too.) 

A validation rule was the only way I could think of possibly achieving this...sorry I'm a "newbie".

Hope that makes sense.


Unfortunately you can't validate a checkbox field and then make a certain number value required.

My suggestion would be to create a picklist field for this other service type with values of "yes" or "no" and then write your validation rule something like this (Additional Service Minutes is the number field):
AND(ISPICKVAL( Other_Service_Type__c , "Yes"),
ISNULL( Additional_Service_Minutes__c ))

Let me know if this makes sense.
Hi - thanks for your efforts.  Your suggestion gave me an alternative idea which has resolved this item.
Great! - So what did you end up doing?


Being new to Salesforce and coming from a home grown Access database we are finding more and more of our processes are changing, particularly in areas we hadn't identified as an issue when writing that list of reasons to change to another CRM...

Previously we had always recorded 15 minutes when downloading clients data to their chargeable time prior to giving them phone support.  This was to cover the cost of download and analysis time.  (a bit of a left over from the past when downloading an email took forever). With the move to Salesforce my initial requirement was to simply automate the calculation based on a checkbox - because this is how we previously recorded it.  However due yo not being able to complete it immediately, and thinking about how we could do it we realised a better solution is to simply provide a number field for our consultants to record the actual time.  So we have, and then obviously created the roll-up etc so we can calculate/display the time remaining on a clients contract that takes this field into account from the timecard.

mmmmmm another reminder to fully assess a requirement before going ahead with building it.

Anyway - many thanks for your response, it is greatly appreciated.





Good Move, Michael. You kept it simple!

Best Regards