Our Knowledge Base covers a wide variety of technical topics, from the basic to the complex.
I am tracking vacation time and I currently have to add a new field for every day an employee wants to take a vacation day. Is there an easier way?
If you find yourself in a situation where you constantly have to add new fields to a table in order to keep up with future dates there is a much easier way to manage this. You may have imported your data from excel and each column represented a different day in your spreadsheet, as a result you have countless numbers of check box or text fields for all past and future dates in QuickBase. This article uses vacation time as an example but this can apply to any scenario that requires you to constantly add fields to a table.
Why is this a bad idea?
1. It's not easy to use. When an employee adds vacation time to your app they must scroll through this list of checkboxes or text fields and select the dates they will be on vacation. This is not very user friendly, the employee will have to scroll through a huge list to find the dates they want.
2. It's hard to manage. You( the application manager) have to constantly add new fields to your table for future dates
3. Reporting is difficult. Because you have a separate field for each date it's very difficult to report on this data. If you wanted to build a calendar view to show you everyone's vacation time for example, this would be impossible because a calendar view can be based on one field only.
How can I fix this?
Rather than having tons of fields for each date you really only need one or two date fields. One to track the start of my vacation and one to track the end of my vacation. So you would add two new fields to your table (To learn more, please see our Add a New Field help topic.) make them both date type, name one start vacation date and name the second end vacation date. You want to make sure you add both of these new fields to the appropriate forms so that users see them when adding a new vacation record. Finally you'll want to delete all those checkbox fields that you were using before hand. These two new date fields will replace all of those.
When users go to enter vacation time they will select a start date and select an end date. If I wanted to take a vacation in April from April 1 to April 5th and I wanted to take a vacation in December from Dec 21- Dec 25th, I would submit two separate vacations one for April and one for December. You'll want to tell your employees that they will need to submit one request for consecutive days only.