Skip to main content
Question

Determining current record per employee (payroll compensation history)

  • August 22, 2023
  • 0 replies
  • 167 views

Forum|alt.badge.img+11

Hi everyone, thanks in advance for the help.

I have a "Team Members" Table which is a table of all of my employees.  It is a one to many relationship with a "Compensation" table where I enter all of the compensation for each employee.

On the Team Members table there is a report called "Payroll Sheet" that will be used for bi-weekly payroll.  It prints out the team members name, annual salary, bi-weekly salary, which is used for payroll entry. Currently, I am taking the largest salary for each team member on that sheet.

However, two of the owners have decided to reduce their salary.  So now I do not need the highest salary but I need the most recent (effective date salary).  But I cannot just take the highest effective date as it needs to be before the payroll date.  This way if we decide to give someone a raise in a month we can enter it now but it will not populate on the report until after that payroll date.

So my thoughts are to create a formula checkbox on the compensation table that will be marked check for each employee's salary to use.  I have this code in there so far

//To be the most current salary the following conditions must be met:
//  Salary must be the most recent effective date that is before the payroll date per employee
 
If([Effective Date]<=[Payroll Date],true,false)
What I cannot figure out is how to limit this to (1) checked entry per Team Member and how to take only the most recent effective date.  
Any thoughts?


------------------------------
Ivan Weiss
------------------------------

Forum|alt.badge.img+15
  • Registered
  • August 22, 2023

Ivan,

This should do it.

When you create the Pay Roll record, fire a Pipeline that searches for the Salary History record for the Related Team Member where

Pay Roll Date OAF Start Date AND 

Pay Roll Date OBF Stop Date

Now you just use the Salary from the Compensation table as a Look Up field for all your calculations.



------------------------------
Don Larson
------------------------------