2 followers Follow

Is there a way to do a validation rule on $Duration

I would like to run a validation rule on the value of the $Duration field in timesheets.  when i try to use the "=" or ">" or "<>" operators, it tells me that $Duration is not numeric, and is incompatible with those operators.  how can i compare $Duration with a value so i can take different actions based on the value of the $Duration field

Tom Saichek Answered

Please sign in to leave a comment.



Great question, all you need to do is convert $Duration to a number.  You can do this by dividing by 1 days.  For example ($Duration / Days(1)) > 3   should work.

Josh Santos 0 votes
Comment actions Permalink

As I face hard time to do my Validation rule and just receive the information to configure it properly, here the formula I used and how it is working, so you can customize it regarding your needs.


  • $C_CustomField > hours(8)
  • $Duration > hours(8)
  • $C_CustomField >Days(1)
  • $Duration > Days(1)


  • $C_CustomField > hours(12)
  • $Duration > hours(12)
  • $C_CustomField >Days(1.5)
  • $Duration > Days(1.5)


The important part is to use the right Operator and then no need to divide but use the right time criteria following with how many you want to use as a limit.

Be care full that Days is not equal to 24h but to you working hours you set up in your organisation (in our configuration 1 days = 8 hours)


I hope it will help you, take care.

Florence Smessaert 0 votes
Comment actions Permalink