Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2495 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have two tables: Contracts and Payroll.  In the contracts table each record has a start and end date.  I want to auto enter the pay period code based on these dates. 

Each record in the payroll table has a pay period start and end date, as well as a Pay run ID. 

payperiod.PNG.7e75b6f2ecf238052d37a1f1a57a8ae3.PNG

The tables are related: Contract primary key in Contract table to Contract foreign key in Payroll table.

I don't know if I should use If, Let, Look up??  I don't want to use Case, because then I'll have to change the calculation each year.  I'd rather add 12 records to the payroll table for the 12 months each year. 

These are two calc's I've tried, each calculations return "1".

If  ( Work_Date_Start ≥ Payroll::Pay_Period_Start  and Work_Date_End ≤ Payroll::Pay_Period_End; Payroll::Pay_Run_ID )

Lookup  ( Payroll::Pay_Run_ID ;  Work_Date_Start ≥ Payroll::Pay_Period_Start  and Work_Date_End ≤ Payroll::Pay_Period_End )

Thanks much!

Posted

Clarification - the tables are connected in the relationship graph, but the Payroll records are not related to the Contract records. 

Posted

They're connected but not related? I will ponder that.

Meanwhile, one solution would be to make a new table occurrence and relationship using the start/end dates. That will make it really simple, you won't need a calculation, the relationship will handle it.

This topic is 2495 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.