Tel: 07879426788
Email: enquiries@meadowlark.co.uk
In part 3 we will add some fields to the database to make it a more useful.
The database has only a few fields, and no doubt you can think of a few more you could add to make the database a bit more useful.
We will start by adding a few fields to the database. These fields will record the type of task (a), and the priority of that task (b), and perhaps a date planned field (c). Field (a) might conceivably be used to allow the user to for example, focus only on say Gardening tasks or Shopping tasks, or Child care tasks, perhaps someone at home needs backed beans NOW, and so shopping is the highest priority. Perhaps some sort of grouping of tasks is desirable. This field could be a limited list, or it could be free-form text, the latter is more flexible. Moving onto the priority field, this will allow the user to quickly state how urgent a task is. This is useful to indicate the order in which the tasks should be completed. We could in fact add a date planned field too. This too will help planning the execution of tasks, as it could record that date when (ideally) that task should start. Of course this is only usefull if we have an easy means of searching the database to reveal all these due tasks. Of course Lotus Approach provides this facility.
First start by clicking on the Design button
The screen will change and display design mode and show a small toolbox containing some small icons see figure 15 . We will interact with these to add some new fields
First click on the small icon at the bottom right of the toolbox (see 1), it will display "Show the add field dialog". This will display another toolbox that provides access to the table designer (see 2) in figure 16. Clicking on the field definition button opens the table designer which will allow us to add new fields. Click on the empty row at the bottom of the displayed table and enter a name for the task type lets call it tType. Lets leave it as a text field, now click on Options, click on the Validation tab. We are going to state what type of input is valid, and provide a list of valid values
Whilst in the validation tab, click on the "One of" and enter the first type of task, lets say you are an avid gardener and want to add Gardening as a type of task. Type this into the box on the right, and then click on the Add button, Gardening will appear in the table below, now go back to the field above an type over Gardening with the next task type, lets call it Child care, click on the Add button and this will be appended to the table below. Add any other task type that are appropriate to your lifestyle. I have added DIY, or shall I say my girlfriend added it.
Let add some more fields
Click on the empty row at the bottom of the table designer, add a field called iPriority, in the next column set this as a numberic, in the next column I generally set my numbers to size 10 to force it to be displayed as an integer. I do this by lopping off the ".2". Finally lets add the dPlanned date
Do this by clicking on the blank record at the bottom of the table designer, enter dPlanned, and set its type as date, click on Ok to close the form.
We are now going to add the fields we created in the table to the form so we an use them
With the table designer visible and the form in the background, drag each of the fields we created from the table designer to the form.
They will be displayed in default style and you may want to customise them to be consistent with your existing controls.
Save the apr file by clicking on Ctrl s or from the File menu ie File/Save Approach File. The database is now ready to use with the new fields
Notice how when you enter the type field it will only allow you to enter types of tasks we specified in the table designer, and the planned field is pre-set to accept dates.
We have taken an existing database and added a few more fields to make is more usable.
We have updated the form appropriately
We have saved our work.
In the subsequent pages we will discuss some database concepts. These at the very least will help you understand how Approach and any other common databases work.
Previous Next