![]() |
FoxPop |
www.foxpop.co.uk |
POWERBASE TUTORIAL 7
by
Laurie
Jane Kern
PowerBase Views
If you do not have it with you, download the Sample Address Book(07) from end of the last lesson. If you check it you will see that it has 12 records, and 5 Groups which we created in Tutorial 6c.
In this tutorial you will be considering, creating and modifying Views. You will have noticed that when you build a Table two default Views are automatically created for you, the List View and the Card View. Both Views can be accessed through the Schema, and both Views contain all the initial Fields in the Table.
Firstly let me give you some facts that you may not know about Views:
![]() | Did you know that if you delete a Field from your Table it is automatically removed from the View? |
![]() | Did you know that if you add a Field it is not automatically added to the existing Views? |
![]() | Did you know that you can rearrange the order that Fields appear in a view AFTER you create your Table? |
![]() | Did you know that any and all Groups can be applied to any or all Views? |
![]() | Did you know that there are three views that you can use to view data in a Table: Card, List, and Page? |
Whew, that's a lot of information! Now you are going to work with some Views to demonstrate some of this functionality. Firstly you will edit the Card View, then you will make a new List View and after that you will create a Page View, which is not used as often as the first two. The tutorial concludes with a discussion of View preferences, and a few other tips and tricks.
Modifying an existing View
To demonstrate how to modify an existing View, I have chosen to use the Card View. Open up the Sample Address Book (07) and open the Contacts Table in Card View. It does not matter if you have any filters or Groups applied. As you can see we have the Fields in the following order: Title, First Name, Last Name, Address Line 1, Address Line 2, City, Region, Postal Code, Country, Telephone, etc... Now suppose that you would prefer to have the home telephone number just after the contact's Last Name Field as this would make it easier to phone your friends. Make sure the Card View has focus and on the menu go to View|Edit View Layout (the speed keys for this is Ctl+L). The Card View should now look like the screen shot below
Notice that all the Fields in the Table are on the left and the labels for the Fields and actual data are in the View are on the right. All the Fields in the underlying Table are shown, in case you have added a Field to the Table that is not in this View. Fields can be dragged from the left and dropped on the right side of the window to add them to a View OR Fields can dragged from the right side to the left, to remove them. To rearrange Fields you just drag them up and down, which you can do now. So click and drag the label for the Telephone Home Field upward so it is just below the label for the Last Name Field. Now finish the edit by doing one of the following 3 actions: 1) select from the menu View|Finish editing View; 2) press Ctl+L; 3) click the 'x' button in the upper right corner of the window. The Field list on the left side of the window should now be gone and you should have Home Telephone number below the Last Name Field. That's it, it is that simple! And changing a List View is just the same as changing a Card View.
Creating a new View
Suppose that in this new View, which will be a List View, you would like to see the contacts name in one entire Field - it makes looking for somebody easier! OK - you are going to add a new Field to your Table and add it to your View, along with the work telephone number.
Begin by going to File|Create New|Field..., now name the new Field 'Full Name' and set the type to Calculated then click the OK button. Next you should see the Properties dialog box. On the Attributes tab make sure 'Search when Finding' is checked and then on the Calculation tab enter the following calculation (those are spaces between the quotes):
[Title] + " " + [First Name] + " " +[Last Name]
Test it and if the 'no error' message come up, click OK. Now remember what I wrote earlier about new Fields not showing up in existing Views? If you want to test this, open up your Card View and List View, the new Field 'Full Name' should not be visible in these Views.
You are now going to create a new View, so you can see this calculated Field (and remember that since it is calculated, you can NOT use it for entering new names in to your database!). From the menu go to File|Create New|View.... Name the View 'Work Phone' and set the type of View as List then click the OK button. You should now see a View similar to the first screen shot above, except it is a List not Card View. On the left should be all the Field names and on the right you should see a List View with ALL the Fields - they are automatically added for you. Now, one at a time, drag and drop the Fields from the List View, on the right, to the left side until you only have the Telephone Work and Full Name Fields remaining in the View. You will see that the Full Name column is the last column in the View. When you have just these two remaining Fields, drag one to the other side of the other so you end up with Full Name to the left of the telephone number Field (see the screen shot below). Then "close" the View editing window and resize both of the columns to see the ENTIRE name and work telephone number of the contact and now you are done!
Notice how you have a "FULL" name displayed for your contacts. But if you look closely at those contacts that are not people, such as 5Alive, there is a leading space which is due to the Title Field being blank. A way to remedy this would be to NOT include the title in the calculation. Again, to build upon what you have already learned, click the 'Switch Group' button, and you will see that any Group defined for the contact Table can be applied to this new View - you can cycle through all 5 Groups.
And so on to the last element of the tutorial, which is Page View.
Working with Page View
Page View is a special View that you will probably not use very often; it is mostly for printing, but it is worth covering it here so you understand its strengths and weaknesses. From the menu go to File|Create New|View.... Name the View 'Invitation' and set the type of View as Page. Notice that the Page size and Margins tabs are now enabled. Select a page size that is in your printer (A4 for the UK, Letter for the USA) but make sure you look at the other sizes that are available, such as letter (hint, you can use this for addressing envelopes). Leave the default for the paper orientation and margins and click the OK button. You should now see a List of Fields on the left and a "blank" piece of paper on the right. Zoom out if you need to, so you can see more of the page. There is one extra "Field" at the top of the Field List on the left and that is the 'Text label'. This is a special Field, where you can type text that is only going to appear on this View.
There are some things to note about the text label:
![]() | Text labels can contain any fixed text. You can use this to display the name of a Field or a standard paragraph in a form letter. |
![]() | Text labels alone may be suitable for some simple standard forms, however they cannot achieve the effect traditionally associated with a "mail merge". |
![]() | A mail merge can be achieved by using calculated Fields and text labels. |
You are now going to make an invitation to a Geofox Party! Open the Contact Table in any View, and check entry number of Ms Jane Austen. In my Table she is number 12. Drag the Full Name Field on the page and position it in the upper left corner of the guide lines, but not in the margins. Drag the border to the right to resize the window, and make sure you can see the entire name clearly - (you may have to zoom in to make it easier to do). Below the name position the Address, City, Region, Country, and Postal Code Fields. It should look similar to the screen shot below.
Now drag a Text Label from the left and drop it in the center of the page, a text edit box should now be open, enter the following:
"Fox Pop is having a graduation party and you are invited. Please come to the Victoria and Albert Museum in London on April 1, 1999. At this party you will be able to meet all the programmers, web masters and lurkers in the Geofox community."
Then click the OK button and it will close the edit window. Resize the text label so you can see all the text, possibly using zoom to make it easier, to see and manoeuvre. Center it in the top half of the page.
Now add one more text label with a closing phrase and your name. Close the "edit view" and you should have something that looks like this screen shot. (Note that you can use a carriage return in the editor box, though I did not, and there is a limit to the number of letters that you can enter into the text label)
Again, you can cycle through all the records, apply Groups and do Finds in Page View, but what good is this View? Well as I have shown you here, you have made an invitation to a party that can now be printed and mailed.
When you want to print out the Page View, you need to make sure that the font and the size of the print is exactly how you want it. Go into menu|View| Edit view layout, and you will find yourself back to the screen where you composed the invitation (screenshot number3) Move the focus to the name, and then go to the button bar on the right of the screen and click the 'properties' button. This will call up the properties dialog box for the Field you are working with. Choose the default font, Arial, but alter the point size to 12. This will give you a clear print out.
When you have made your selection, click OK. You now need to do this with all the Field boxes in the address. You will probably find that you need to resize the boxes to allow for the larger print size. When you come to the text label box, again select the font and point size you want for this text and you might like to bold the text for additional impact. Look again at the screenshot above: you will see that there is a tab for Content . This is the edit box where you can alter the text in the text label Field.
When you have made all the adjustments you want, click the close button, and you are ready to print. From the menu|File|Printing you will see the familiar selections to set page set-up and print options. Then you can preview your invitations before final printing. You will discover that the default option is to print out all 12 so if you are curious to see what the final printed version looks like, I suggest that you alter the settings, and choose to print only one or two of your invitations! Check the end of the tutorial before printing.
I hope you can see why a default Page View is not created when you first create a Table. Personally I find Page View difficult to work with, but it is the best we have, at the moment to do a "Form Letter". Purple Software have hinted that sometime in the near future, there will be a more robust report writer that will allow more advanced reports to be built, so keep your fingers crossed! Oh, and don't forget that you can print in List and Card View too.
To summarize some of the points made above about Page View:
Once you are out of edit mode, you can double click the "displayed Field" to open a Display Properties dialog box and here you can re-set individual properties such as font, color and size, as well as alignment and if a border is to print.
Once a text label is "filled in" it can not be re-edited when in edit mode of the View. By double clicking on the text label, as mentioned above, the Display Properties dialog box has a tab labelled, Content, where you have access to the contents of the text label Field, and it can be edited.
Other information you may want to know about Views
Now that you have learned how to change and create different Views, you may want to set some preferences on how YOU view them. Select the "Preferences" command from the "Tools" menu to display preferences for the current View. Each View type: Card, List and Page have different display options that can be set here. This preferences dialog box allows you to control the display attributes of the View titles (as opposed to the Field values). Using this dialog box you can also change the name of the View, control current record tracking, and toggle the display of Field attributes. You can decide whether column titles or record numbers are to be displayed in List View, and more. I will leave it up to you to experiment and find what works best for your situation.
I would like to mention one option that is available for all the Views and that is the Current record tracking option. This is the mechanism whereby you can have Views within the same Table stay in sync. For example if you have both a List and Card View on screen and you scroll through the List View, the Card View will update to show the "current record" as indicated by the List View. You can set this to happen all the time, never or just when you select the View.
Another option is Display Field properties - by default the Field display properties dialog pops up when you tap a Field in a View. Some like this, others find it incredibly irritating - this is where you can turn this effect on or off.
Another tip is about minimizing a View to the desktop. You've probably noticed this already, but it is worth mentioning that once you've created a View, if you plan to use it regularly, minimizing it to the desktop for ready access is better than closing it and opening it again from the Schema View
Page View is particularly appropriate for displaying a Memo or Notes Field.. This is because as compared to List and Card View where the basis of scrolling is row/Field oriented, in Page View the scroll bars work on the image of the "page". So consider a Page View as designed for screen display rather than printing:
I would like to thank Chris Hennings at Purple Software for providing some of the information about the Page View used in this tutorial, his comments have made this tutorial a lesson for me as well :)
That's it for this lesson. Next time you shall expand upon the capabilities of some of the other Field types such as Boolean, calculated and currency Fields, where as here you used a calculated Field to concatenate 3 Fields into one, that is just one way to use this Field!
You can download Sample Address Book (08) here, which includes the two new Views which we have created in tutorial 7
We have found a bug with PowerBase, If you are printing via the PC (and Psiwin) the very first Field added to a Page View, will print as BLACK. This does not occur is you print directly from your FOX or S5. To work around this problem, Purple Software has suggested that when building a Page you place a dummy Field on the Page FIRST - before any of the others. Use a text label and leave it blank. Then size this first field down so it is very very tiny. Then place all of your other fields on the page. In this manner you will not get a black field.
© LJKern and FoxPop 1999