# Need to combine multiple time cards in a single entry for the correct calculation.

• 0
• Question
• Updated 1 year ago
Hi team,

We have an application where one associate fills multiple timecards for a day. Now, I want to create one timecard which will show the total hours of all the time cards. It is because of to calculate of the actual pay of those time cards.

If we pay one associate on hourly basis then, then there is no problem to calculate the rate if they fill multiple time cards or a single time card.

Problem is when we pay associate on daily basis then if they fill 3 time cards of today like one is 5 hours, 2 hours and 1 hours and their daily rate is \$100 then, system calculate rate \$300 for today because for some reason we want to pay full rate whether they work for 3 hours or 8 hours.

Hope the above explanation clears everything.

Please let me know if you need any further information.

Thanks,

Gaurav
• 6,072 Points
• undecided.

Posted 1 year ago

• 0
• 6,072 Points
Any update?
• 75,144 Points
Can you state your current relevant tables and their relationships?
• 6,072 Points
Hi Mark,

I have two tables:

1. Associates
2. Time cards

one associate has many time cards.

The associates' table has their rate and pays type (Hourly and Daily) and based on that time cards calculate the rate as per the hours worked.

Do let me know if you need any further information.

Thanks,

Gaurav.
(Edited)
• 75,144 Points
You will need to have a table called Employee Dates where the Key field is a concatenation of the [Record ID# of Employee] and the [Date].

List("-", ToText([Record ID# of Employee], ToText([Date]))

If you like you can actually create the formula field and make it the Key field by using the API_SetKeyField&fid=10 API typed into the URL bar.

Then set up an Action to ensure that for every time entry, the action will fire if the Key field does not exists already for that Employee and date.

I do that by making a field Key field exists? with a formula value of true and look that up down to Time Entries, and fire the Acton of the Ket does not exists.

Then you will be able to make summary fields up to that Employee Dates to have the data available to know how many entries there were that date.

• 6,072 Points
As per your suggestion, I have created a new table called Employee Dates and set up a formula field which shows the combination of Employee Record ID# and Date and made it as a key field.

Do I need to create any relationship with the newly created table?

Thanks,

Gaurav
• 75,144 Points
Yes, , you need to create a similar concatented field in time cards and make a relationship to employee dates. Then you can do any summary fields you need.

You will also have to initially populate the employee dates table by making a summary report on timecards and copying the records over to the employee dates table.
(Edited)
• 6,072 Points
Mark, as I have already made the new formula field as a key field which shows the combined text of Employee Record ID# and the date. but, I can't copy the records over to the employee dates table as there are some duplicates records for a day.
• 75,144 Points
Right, hence my suggestion to use a summary report on that concatenated field. :)