Skip to main content
Question

Need to do a carry over formula

  • January 25, 2022
  • 0 replies
  • 32 views

Good morning,
I am working on a time card system and have everything working for totals but i am needing to do a formula / rule for over time carry over. So like any time card anything over 40 hours would go to over time. What i am looking to do is create a formula to move any hours from the pay type Regular Earnings over the 40 hours to the OverTime pay type totals field. 



------------------------------
Matthew Jones
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
np, you will copy your current complicated formula for Regular Earnings and call it [Regular Earnings before 40 hour Cap].  If you like, put it on the form to satisfy your self that it works.  Of course it will, but i know form your past posts that it's a long formula.

The you will edit you current complicated formula for Regular Earnings and replace it with just this one line.

Min(40, [Regular Earnings before 40 hour Cap])

That says to take the smaller of 40 and the [Regular Earnings before 40 hour Cap]
 
Then you will make the formula for [Over Time Total] to be

[Regular Earnings before 40 hour Cap] - [Regular Earnings]

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------

Forum|alt.badge.img+20
  • Registered
  • January 25, 2022
I would change the regular earnings total field into a hidden (you can remove from form) field called 'Total Hours'.

Then your regular earnings field and overtime fields are simply formulas looking at that field.

Regular Formula says, if total hours are less than or equal 40, then show total hours, else show 40.
Over time says if total hours are under 40 show 0, otherwise show total hours minus 40.

------------------------------
Mike Tamoush
------------------------------

Forum|alt.badge.img+20
  • Registered
  • January 25, 2022

I was replying at the same time as Mark. His solution I think is more elegant.

However Mark, I think you have a typo? Overtime total should be Regular Earnings before Cap - 40. Right? And probably include an if statement to only fire when cap field is over 40, so it doesnt show a negative.



------------------------------
Mike Tamoush
------------------------------