home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / apps / powerbase / Docs / BrowseEdit < prev    next >
Encoding:
Text File  |  1994-10-01  |  21.6 KB  |  404 lines

  1.                         Browsing, Searching and Editing
  2.                         ===============================
  3.  
  4. This document describes all the features accessible from the Powerbase
  5. keypad together with other facilities associated with the editing of
  6. records. Databases which suppress the keypad and place controls on the
  7. record window may not include all the facilities described. Keystroke
  8. equivalents exist for many of the mouse operations and these are given in
  9. parentheses at the appropriate points.
  10.  
  11. Subfiles
  12. ========
  13. The concept of subfiles needs explaining before proceeding further. A
  14. Powerbase database comprises six subfiles which are numbered 0-5. When a
  15. database is opened the “active” subfile is always 0, as shown in the title
  16. bar of the record window, and new records will be added to subfile 0. You
  17. may ignore the other five if you wish. They occupy no additional room in the
  18. database: if the length has been defined as 100 records this means a common
  19. “pool” of 100 from which records may be all assigned to subfile 0 or
  20. distributed between the subfiles as the user wishes. Suggestions as to when
  21. several subfiles might be useful are given in the relevant sections below
  22. (“Changing subfiles - Using more than one subfile”).
  23.  
  24. Appearance of record window
  25. ===========================
  26. A newly-opened database will display the first record in subfile 0. The
  27. title bar of the record window gives the record number and the primary key.
  28. The primary key field is highlighted by making its background pale yellow*
  29. instead of white like the rest and the field descriptor is red* indicating
  30. that the primary key is the currently-selected key. It is possible that two
  31. fields will be highlighted in this way meaning that the primary key is a
  32. composite one made up from the characters of two fields. (See ‘Create’ for a
  33. description of key-structure.) Most of the other descriptors will be black
  34. but dark blue* indicates a subsidiary key which has been created by indexing
  35. the field. (See ‘Indexing’.) There may also be fields whose bounding boxes
  36. and text are dark green* indicating that a field is linked to a validation
  37. table. (See ‘Validation’.)
  38.  
  39.         *These are the default colours. They may have been changed
  40.          via the ‘Colours’ entry on the ‘Miscellaneous’ submenu.
  41.  
  42. Moving about the database 
  43. =========================
  44. Six buttons on the top row of the keypad cause movement within the subfile.
  45. From left to right their actions when clicked on with SELECT are:-
  46.  
  47.         1) First record (keystroke equivalent f3)
  48.         2) One record back (SH/f2)
  49.         3) 10 records back (SH/f7)*
  50.         4) 10 records forward (f7)*
  51.         5) One record forward (f2)
  52.         6) Last record (SH/f3)
  53.  
  54.         *The “fast forward/rewind” interval may be altered by typing
  55.          in the writable icon between these two buttons.
  56.  
  57. The file wraps around so that one forward from the last record takes you to
  58. the first and one back from the first record takes you to the last. In
  59. accordance with RISC OS conventions clicking with ADJUST instead of SELECT
  60. reverses these actions so that ADJUST over the first button, for instance,
  61. takes you to the last record rather than the first. This allows you to move
  62. about the database with fewer movements of the mouse. (Compare with the
  63. standard behaviour of scroll bars and scroll arrows.)
  64.  
  65. The first button on the second row of the keypad (“Play”) starts an
  66. automatic flip-through of the records and the last button  on the row
  67. (“Stop”) halts the process. If started with SELECT the records are displayed
  68. in forward order. ADJUST displays them in reverse order and you may swap the
  69. order at any time by a further click on “Play”. The time for which each
  70. record remains on screen may be altered by changing the “fast forward”
  71. interval (see above).
  72.  
  73. Changing keys
  74. =============
  75. Two “key” buttons in the middle of the second row of the keypad enable you
  76. to cycle through the available keys in opposite directions (SH/f9 and f9
  77. respectively). ADJUST reverses the action of SELECT. If no subsidiary keys
  78. have been defined these buttons have no effect. Otherwise you will see the
  79. red highlighting of the key-field descriptor move from one field to another
  80. as the key changes. The displayed record is always the first as defined by
  81. the ordering of the new key.
  82.  
  83. Changing subfiles
  84. =================
  85. A group of three buttons in the middle of the third row has the following
  86. effects when clicked with SELECT:-
  87.  
  88.         1) Back one subfile (SH/f4)     
  89.         2) Rotate subfiles (CT/f4)      
  90.         3) Forward one subfile (f4)    
  91.  
  92. 1) and 3) change the current subfile to the previous one in sequence and the
  93. next in sequence. As with the corresponding buttons for moving from record
  94. to record “Forward” from subfile 5 takes you to subfile 0 and “Back” from 0
  95. takes you to 5. ADJUST reverses these actions. “Rotate” renumbers the
  96. subfiles so that subfile 1 is the old subfile 0 etc.  The old subfile 5
  97. becomes the new subfile 0. Records which were previously in, say, subfile 2
  98. will then be found in 3 instead. Since this is quite a drastic change you
  99. will be asked to confirm that it really is what you want before Powerbase
  100. proceeds.
  101.  
  102. Using more than one subfile
  103. —————————————-
  104. A Powerbase database consists, as stated earlier, of six subfiles numbered
  105. 0-5. You may use subfile 0 (which is used by default) and ignore the others
  106. if you wish, but there are occasions when users may find subfiles very
  107. useful. If, for example, you are maintaining a set of pupil records in a
  108. school you could assign one subfile to each year. At the end of a school
  109. year the promotion of Year 1 pupils to Year 2, Year 2 to Year 3 etc can be
  110. brought about by a single click on the “Rotate” button. 
  111.  
  112. A more common use of subfiles is to use 0 to hold the main set of records
  113. and 1 as a dumping ground for records which you want out of the way but
  114. don’t want to get rid of permanently. Powerbase is actually used in this
  115. way in a Further Education college where the applications file for a course
  116. is built up in subfile 0. When students enrol on the course their records
  117. are updated to reflect this and records for those who have not appeared are
  118. moved into subfile 1. The enrolled students in 0 are then timetabled and
  119. class lists are printed. During the first week of the course there is a
  120. trickle of late enrolments which simply involve retrieving the required
  121. records from subfile 1 and reinstating them in 0.
  122.  
  123. The facilities for moving records, singly or in batches, from one subfile to
  124. another are described below. (“Deleting records”)
  125.  
  126. Searching for a record
  127. ======================
  128.  
  129. Searching by key
  130. ————————
  131. The icon bearing a record card and a question mark is the “Search” button.
  132. When clicked with SELECT (keystroke equivalent f1) the keypad expands to
  133. reveal a new section on the right. Type the key of the record to search for
  134. into the writable icon and either click on ‘OK’ or type RETURN. (‘Current
  135. key‘ on the main menu gives access to a dialogue box describing how the key
  136. is constructed.) If the key exists in the current index the record will be
  137. found and displayed. If the key doesn’t exist Powerbase bleeps and displays
  138. the nearest matching record with the key field flashing. If the database is
  139. a small one with keys which differ greatly from record to record then the
  140. displayed record may not look to be very near at all. The keypad will return
  141. to its normal appearance if you typed RETURN or used SELECT on the ‘OK’
  142. button. If you want to use the “Search” function repeatedly it is more
  143. convenient to have the keypad remain in its expanded state and this can be
  144. achieved by clicking on ‘OK’ with ADJUST. If you do this you will notice
  145. that the icon to the left of the ‘OK’ button displays the number of matches
  146. found.
  147.  
  148. The index being searched is displayed on the expanded keypad. Provided the
  149. database uses at least one subsidiary key you will see it change as you
  150. click on either of the “Change key” buttons.
  151.  
  152. As described above the “Search” function searches only the current subfile.
  153. If you suspect that the record you require might be lurking in some other
  154. subfile you can force all six to be searched. This can be achieved by using
  155. ADJUST (keystroke equivalent SH/f1) instead of SELECT on the “Search” button
  156. or, after the keypad has expanded, by changing the selected radio button
  157. from the first to the second. If the record is found in some other subfile
  158. then that subfile will be made the current one and the record displayed.
  159.  
  160. If searching on a numeric key you will only find the record by entering a
  161. number of exactly the right value. If the key is alphabetic, however, you
  162. may use just the first few letters if they are sufficient to distinguish the
  163. key from others.
  164.  
  165. Searching by record number
  166. —————————————
  167. You may type a record number, preceded by #, (e.g. #1054) instead of a key.
  168. Provided the record is in use Powerbase will find and display it, regardless
  169. of what subfile it is in. If the record has been deleted or has never been
  170. assigned a “Record not in use” error is generated.
  171.  
  172. Searching by filter
  173. —————————-
  174. In the middle of the last row on the keypad is the “Filter” button. When
  175. clicked the keypad expands downwards revealing a writable icon into which
  176. you can type a Search Formula followed by clicking on ‘OK’ or typing RETURN.
  177. (See ‘Printing’ for an explanation of search formulae.) The keypad buttons
  178. used for browsing will now only display records which match the search
  179. formula, all non-matching records being “filtered out”. The match is case
  180. specific by default but may be made non-specific by de-selecting the option
  181. switch on the keypad extension.
  182.  
  183. Deselecting the “Filter” switch restores the keypad to its normal appearance
  184. and operation.
  185.  
  186. Editing the database
  187. ====================
  188.  
  189. Adding new records
  190. —————————
  191. The icon bearing a record card and a plus sign is the “Add record” button
  192. (keystroke equivalent f10). Clicking with SELECT displays a blank record for
  193. you to fill in and the window title says “New record”. The only field which
  194. you MUST fill in is the primary key field. Any or all of the rest of the
  195. fields (including subsidiary key fields) may be left blank. You may find on
  196. some fields that the keys you press will have no effect. This will happen,
  197. for example, if you try to type letters into a field which has been defined
  198. as numeric. 
  199.  
  200. If you type into a field which is highlighted in dark green you may get an
  201. error message. Such fields will only accept certain “values” which are
  202. listed in a Validation Table (see ‘Validation’). To see what these allowed
  203. values are make sure the caret is in the relevant field then click on the
  204. “List values” button on the keypad (keystroke equivalent f8). If the table
  205. validation feature proves to be a nuisance you can turn it on and off with
  206. the ‘Validate input’ entry on the ‘Validation’ submenu. If the entry is
  207. ticked then validation is “on” (keystroke equivalent SH/f8).
  208.  
  209. When you have entered as much of a record as you want to you can click “Add
  210. record“ again for another blank record. The record which you have just
  211. entered is automatically written to the file. The same is true if you click
  212. any of the other keypad buttons or close the database altogether - you never
  213. need to do anything to “tell” Powerbase to update the file. There is indeed
  214. a button called “Force update” but you don’t really need to use it. It is
  215. provided so that, during a long working session, you can force Powerbase to
  216. save to disc certain items (indices and validation tables) which are kept in
  217. memory while Powerbase is running. This is to guard against a power cut or
  218. system failure (such as some kind person switching your computer off for you
  219. when you’ve just popped out for a minute!).
  220.  
  221. Using a template
  222. ————————
  223. Sometimes you want certain fields to be filled in with a fixed value on
  224. every new record. To save you typing the same thing into the same field
  225. every time, Powerbase provides an “Edit template” function which is
  226. accessible from the ‘Miscellaneous’ submenu. When you choose this you are
  227. presented with a blank record and the window title says “Enter data which
  228. you wish to appear by default on new records“. Type in the required ”fixed“
  229. data then click any of the usual keypad buttons. You will now find that the
  230. “blank” record displayed ever time you click “Add record” (f10) isn’t really
  231. blank at all but already contains the data entered in your template. Note
  232. that this feature affects NEW records only. It doesn’t have a retrospective
  233. effect on existing records.
  234.  
  235. Using the clipboard
  236. —————————-
  237. The buttons at the far left and right of the middle row of the keypad may be
  238. thought of as “Icon to clipboard” and “Clipboard to icon” respectively. They
  239. can save considerable time when you want to copy data from one field into
  240. another, whether in the same record or in a different one. When you click
  241. SELECT on “Icon to clipboard” the contents of the field which has the caret
  242. are stored in memory. Positioning the caret in another field and clicking on
  243. “Clipboard to icon” will copy the stored data into the new field. If the
  244. data is too long for the field it will be truncated to fit. Once you have
  245. data on the clipboard you may copy it into other fields as many times as you
  246. wish - the clipboard contents only change when you click on “Icon to
  247. clipboard“ again.
  248.  
  249. Choosing where the caret starts
  250. ————————————————
  251. When an existing or blank record is displayed Powerbase places the caret in
  252. the first editable field of the record. (This, incidentally, means the
  253. lowest-numbered field which may not necessarily LOOK like the first if the
  254. fields have been placed in strange positions in the window.)
  255.  
  256. If you are going through the database making changes to one or two fields
  257. somewhere in the middle of the record it may be convenient to have the caret
  258. start somewhere else. Click MENU over the field where you wish the caret to
  259. start, go to the ‘Field’ sub-menu and choose ‘Start editing’. Whenever a
  260. record is displayed the caret will now be placed in the chosen field. The
  261. same procedure is used to restore the normal starting position. 
  262.  
  263. Altering existing records
  264. ————————————-
  265. A displayed record may be altered manually without any restrictions other
  266. than those applying to the addition of new records (see above). You will be
  267. asked to confirm an alteration which would result in a change to the primary
  268. key. The normal RISC OS conventions for editing writable icons apply, e.g.
  269. CTRL-U to clear the icon. As with new record entry you need do nothing to
  270. make Powerbase record your changes to disc - the process takes place when a
  271. different record is displayed, when a database is closed or when you quit
  272. Powerbase.
  273.  
  274. Can I “undo” if I make a mistake?
  275. ————————————————-
  276. Yes, provided that you haven’t clicked on ‘Force update’ (a thing you should
  277. not normally need to do anyway) or done anything which causes Powerbase to
  278. display a different record. In other words you can undo changes made to the
  279. current record as long as it remains on the screen.
  280.  
  281. Bring up the main menu and choose ‘Undo changes’. The displayed record will
  282. be returned to the state it was in when you displayed it and before you
  283. began to edit it. To restore single fields, click MENU over the required
  284. field, go to the ‘Field’ sub-menu and choose ‘Undo changes’. 
  285.  
  286. Note that only ordinary writable fields and check boxes may be restored; you
  287. can’t restore external fields (see below) which is why a warning is normally
  288. issued before deleting such fields.
  289.  
  290. Making the same change to many records
  291. ———————————————————
  292. To alter a given field in a set of records you must first point the mouse at
  293. the field and click MENU. This gives access to the ‘Field’ submenu on which
  294. the second item is ‘Global changes’. In the first writable icon enter
  295. whatever you want the field changing to. In the second enter a Search
  296. Formula specifying which records are to be changed. (See ‘Printing’ and also
  297. “Searching by filter”, above.) When you click on ‘OK’ or type RETURN all
  298. matching records in the current subfile will be altered in the way you have
  299. specified, provided that the new data will fit. If no search formula is
  300. entered then ALL records in the subfile will be changed. If no new data is
  301. typed into the first writable icon then the field in the matching records
  302. will be BLANKED.
  303.  
  304. You may also use ‘Global changes’ to perform a simple calculation e.g. “+12” will cause 12 to be added to the current value in the field on
  305. all the matching records. “*5-13” will cause current the value to be
  306. multiplied by 5 and then decreased by 13. It is operations like these which
  307. are most likely to produce values which won’t fit in the field, especially
  308. if floating-point numbers are involved. The operation isn’t limited to Numeric fields, or even to other types of field consisting wholly of numerals: ‘Powerbase’ will find the number embedded in an entry such as “ABC45XYZ” and the operation “+12” would convert it to “ABX57XYZ”.
  309.  
  310. Deleting records
  311. ————————
  312. Only three keypad buttons still need explaining; the large one bearing the
  313. dustbin icon and the ones on either side of it:
  314.  
  315.         1) Shift record back (SH/f6)    Moves record into previous subfile.
  316.         2) Delete record (CT/f6)        Removes record permanently.
  317.         3) Shift record forward (f6)    Moves record to next subfile.
  318.  
  319. The action of 2) is obviously more drastic than those of the others and you
  320. will be asked to confirm your choice before the record is actually deleted.
  321. The others “delete” records from the current subfile but do so without any
  322. fuss or bother because you can always get them back again. It is sometimes
  323. useful, especially when reinstating a record, to be able to “follow” it into
  324. its new subfile. You can do so by holding down SHIFT while you click on the
  325. keypad button.
  326.  
  327. Deleting many records at once
  328. ——————————————-
  329. Powerbase provides a ‘Batch delete’ choice on the ‘Miscellaneous’ submenu.
  330. It leads to a dialogue box which displays the same three icons as those on
  331. the three keypad buttons just described. Here, however, they are merely for
  332. identification. The radio buttons beneath them determine what will happen to
  333. the records and the default setting is for “Shift forward”. Type a Search
  334. Formula (see ‘Printing’ and also “Searching by filter”, above) and click
  335. ‘OK’ or type RETURN. All matching records in the current subfile will be
  336. moved or deleted as specified.
  337.  
  338. External fields
  339. ===============
  340. External fields are described in some detail in connection with creating a
  341. new database (see ‘Create’). They involve Text, Sprite or Draw files (one
  342. file for each record) which are stored within the database application
  343. directory and are either linked to buttons on the record screen or are
  344. actually displayed in large icons on the record screen. (The latter type
  345. cannot be used for Draw files.) They provide a means of associating record
  346. fields with pictures and with blocks of text which are too big to fit a
  347. normal text field.
  348.  
  349. You can’t edit an External field directly, even when it contains text as
  350. opposed to graphics. When you move the pointer over such a field it changes
  351. to two linked squares indicating that the data associated with the field is
  352. linked to it but not actually “in” it in the sense that data in ordinary
  353. editable fields is.
  354.  
  355. To link a file with such a field all you need do is drag the file’s icon
  356. onto the record window and drop it on the appropriate field. If, for
  357. example, the record includes a field represented by a “Text” button, i.e.
  358. one bearing a small version of the Edit icon, you may drop a Text file onto
  359. it. The button’s icon changes to the small version of the Text file icon to
  360. indicate that the file has been linked. As long as the filer has “seen” the
  361. Edit application (or some other RISC OS text editor) clicking on the button
  362. with SELECT will load the file into the editor and display it. You may then
  363. edit the file and re-save it without altering its name and it will still be
  364. associated with the same field of the same record. Sprite and Draw files may
  365. be dropped onto the appropriate type of button in exactly the same way and
  366. may be displayed and edited with Paint and Draw respectively.
  367.  
  368. A field of ‘Text Block’ type may also have a Text file dropped onto it. This
  369. time the text (or as much of it as will fit inside the icon’s bounding box)
  370. is actually displayed on the record window. You can’t edit the text directly
  371. (clicking with SELECT over it has no effect) but it is possible to export
  372. the file for editing (see below). Sprite files may be dropped onto and
  373. displayed in a field of ‘Picture’ type.
  374.  
  375. Any new file dropped onto an external field which is already linked to a
  376. file simply replaces the old file with the new.
  377.  
  378. NOTE If you drop a text file in the wrong place in the record window
  379. Powerbase will think you want to treat the file as like CSV file and import
  380. data from it (see ‘CSV files’) and the ‘Import text file’ window will
  381. appear. This is somewhat startling but harmless enough as long as you don’t
  382. click on ‘GO’ or type RETURN! Click on ‘Cancel’ to get rid of the window.
  383.  
  384. Editing external fields
  385. ———————————-
  386. Clicking MENU over an external field makes available certain entries on the
  387. ‘Field’ submenu which are shaded for other types of field. ‘Clear contents’
  388. enables you to delete the linked file from the database application. Since
  389. deleting a whole file is rather drastic you would probably like to be warned
  390. when this is about to happen. The message “Delete object? Are you sure?”
  391. normally appears, but you can disable it by clicking ‘Warn of delete’ on the
  392. ‘Field’ submenu so that the entry becomes unticked. Finally, ‘Save contents’
  393. on the ‘Field’ submenu permits you to export the linked field to a filer
  394. window or directly into Edit, Paint or Draw.
  395.  
  396. In the case of ‘Text’ and ‘Text Block’ fields a more convenient means of
  397. exporting the file is to select the field as if for printing then type
  398. SHIFT/f5. The ‘Save’ box containing the default filename will then appear.
  399. This works only when nothing else but the required field is selected. It
  400. can’t be used with ‘Picture’, ‘Sprite’ or ‘Draw’ fields because these can
  401. never form part of a print selection and cannot therefore be selected with
  402. the mouse.
  403.  
  404.