The key development to UDAP is its new ability to allow users to share in updating the datafile. Users can update different records simultaneously. UDAP locks the record being updated ensuring database integrity. This development expands the potential use of OfficePower/Xtra's database management capability from personal, small workgroup usage to much larger groups which have multiple updaters.
UDAP for OfficePower/Xtra can process UDAP datafiles created on OfficePower version 7, and vice-versa.
Multi-user UDAP (record-locking).
OfficePower Version 7 UDAP only allows one person at a time to edit a given datafile, with concurrent editing policed by locking the entire datafile against other users for the entire editing session.
A datafile can now also be edited in 'shared mode' via a new function 'data.share'. This allows multiple users to do concurrent changes provided they do not attempt to edit the same record. A given user can refresh their view of the datafile (or just individual records) to see changes made by other users.
Concurrent editing in data.share is policed by checking that the user's view of the record is up to date (with respect to changes made by other users) before allowing them to edit it, and locking the record against other users while the edit is being done (i.e. until the change is ACCEPTed).
Since changes made by a user are available to other users immediately they are ACCEPTed, data.share does not have a WRITE softkey, or a 'Save Work and Exit?' prompt on ending the edit. Nevertheless, changes made by a given user in an editing session can be undone provided they don't clash with changes made by other users subsequently.
System in-fills.
OfficePower Version 7 UDAP allows default values to be filled in for fields when a record is initially created. For Text and Time fields, this must be a simple fixed value of the appropriate type, but for Date fields, it can also be the special value '0', signifying the current date.
With OfficePower/Xtra the user can request more general in-fills by specifying a default in-fill value of the form:
${variable}
where the variables can reflect the current date or time, or environmental information such as the name of the datafile or the user editing it.
For Text fields, the specification can request multiple fixed or in-fill values concatenated to form an arbitrary string, for example:
Created by ${firstname} ${surname}
The default value can be evaluated:
- At record creation (as at OfficePower Version 7) (CREATE RECORD).
- At record creation or duplication (PASTE).
- On completion of a record update (ACCEPT) if the field is empty. This allows a user to re-calculate a previously filled-in value by clearing it.
- On completion of a record update (ACCEPT), regardless of current field value.
Date and time arithmetic.
OfficePower Version 7 UDAP allows virtual numeric fields to be computed from arithmetic expressions involving numeric constants and the values of other numeric fields (real or virtual).
OfficePower/Xtra UDAP extends this to provide similar arithmetic facilities for date, time and duration fields, and provides conversion between these and numeric fields:
duration field = duration2 ± duration1
duration field = time2 - time1
duration field = duration / number
date field = date ± duration
duration field = duration * number
duration field = date2 - date1
time field = time ± duration
Computed field expression functions.
At OfficePower Version 7, all the functions available in UDAP field expressions operated on values derived from a column of records (e.g. max(), min() ), and so were only available in report writer.
The following extra functions will operate on values derived from the current record, and so will be available for interactive use as well:
round(number,places)
The round() function allows a number to be rounded to a specified number of decimal places. This is of particular benefit where the number represents money with implicit decimal places (e.g. pounds and pence). Since values calculated from them are held at much greater precision, this can result in rounding anomalies when a column is totalled.
date(year,month,day)
time(hour,minute,second)
duration(days,hours,minutes,seconds)
The date(), time(), and duration() functions allow date, time, and duration values to be constructed from numbers. Arguments to these functions can be left empty to assume default values.
days(duration) month(date) day(date)
year(date) minute(time) second(time)
hour(time) minutes(duration) seconds(duration)
hours(duration)
These functions allow date, time and duration values to be decomposed into numbers, for example.
today=date(,,) tomorrow=today + duration(1,,,)
now=time(,,) daystoxmas=date(,12,25) - date(,,)
dura=duration(2,3,4,5) days(dura) is 2.13
hours(dura) is 51.07 minutes(dura) is 3064.08
seconds(dura) is 183845
Owner-only record deletion.
A datafile can be marked with a 'owner-only record deletion' property, in which case users can create and edit records as normal (subject to datafile permissions), but only the datafile owner may delete or cut records from it. In conjunction with system in-fills describing when a record was last edited and by who, this can help the owner to audit changes to the datafile.
Unique fields.
UDAP with OfficePower/Xtra allows the application designer to specify that records within a datafile be checked for uniqueness with respect to one or more data fields. Whenever a user attempts to create a record that would be non-unique, they are warned of this and prompted whether to correct the error or continue anyway. In addition, a UNIQUE softkey allows any existing non-unique records in a datafile to be marked for ad hoc manual correction.
Automatic record numbering.
Automatic record numbering makes it easy to generate a new and increasing numeric value for given field(s) of a record without the user having to type it in, and is made available via the autonum system infill available as a default value for text and number fields.
If the field is also unique (see above), then this can provide a unique serial number feature.
Long search field.
With OfficePower Version 7 UDAP provides a 66-character field to enter a search pattern. To handle more complex searches, a longer field is required. OfficePower/Xtra UDAP provides an option to enter search patterns on multiple lines.
Ordinal date picture formats.
At OfficePower Version 7 the day of the month can be formatted for output by specifying either 'd' or 'dd' in the picture of a date field, according to whether leading zeros are to be suppressed or not.
With OfficePower/Xtra a new alternative picture element '#' will allow the day of the month to be output as an ordinal value (1st, 2nd, 3rd, 4th etc.).
Lookup tables on indexed fields.
At OfficePower Version 7, lookup tables and validation conditions can only be specified validly for single-line fields.
For OfficePower/Xtra, choosing a lookup table menu entry will put it into the appropriate line of the field. In fact, options can be selected from a different lookup table for each of the individual lines which make up the field. This effectively makes multiline text fields work in the same way as single line fields. Expansion and validation of lookup table entries takes place on selecting ACCEPT, or on leaving the individual line of the field (even if only moving to another line of the same field).
Date Search by Month and Entry by Dayname.
OfficePower Version 7 UDAP provides limited support for partially-specified values in date fields, in that it allows searches for a named day of the week, but does not allow a dayname to be entered into a field. Conversely, fields cannot be searched to match a specified month or month range, but a month number can be entered.
OfficePower/Xtra UDAP removes these limitations to allow search by partial dates ranges made of dayname, month and/or year, and to allow date entry via dayname. This enhancement applies to both UDAP and Calendar.
For example, entering 'Tue' into a date field in data.update or cal.update will mean next Tuesday. Searching for Dec<->Jan will find any records with dates in December or January of any year.
Default sort order.
With OfficePower Version 7 the ORDER softkey requires the user to manually enter the desired ordering on first use.
At OfficePower/Xtra, the user can edit the 'default sort order' field of the datafile descriptor via data.desc-ed. Any such value is then provided as an initial default fieldname list for ORDER.
Custom field navigation order.
OfficePower/Xtra UDAP allows the form designer to specify a custom field navigation order when the user selects TAB and BACKTAB, rather than just the default left=>right, top=>bottom traverse.