Forum Discussion
QuickBaseCoachD
8 years agoQrew Captain
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.
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.
- GauravSharma38 years agoQrew CommanderAs 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 - QuickBaseCoachD8 years agoQrew CaptainYes, , 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. - GauravSharma38 years agoQrew CommanderMark, 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.
- QuickBaseCoachD8 years agoQrew CaptainRight, hence my suggestion to use a summary report on that concatenated field. :)