saving a record in the middle of data entry
Kenneth Brody
kenbrody at spamcop.net
Fri Jul 2 10:20:08 PDT 2010
On 7/2/2010 12:38 PM, Mike Schwartz wrote:
> Using filePro 5.0.14 and SCO Unix 5.0.7, I designed a very tightly
> packed data input screen that looks like a mini-spreadsheet. There are 32
> rows or 6 fields in each column (16 groups of 6 on the left half of the
> screen and 16 groups on the right half of the screen).
>
> I realize that this is a lot of data entry for one screen. I'm worried
> that users might get part way through the screen, then lose all their work
> if their internet connection drops.
>
> I'm would like to set up some kind of "save" routine that will execute
> at certain points as they are doing data entry. I could execute this save
> routine using something like @wef after every few columns of data entry.
[...]
Why not just use WRITE to save the record as-is? Note, however, that this
means that, if the user breaks out of update mode later, the record is left
at the state of the last WRITE, not the original version of the record.
If you need the ability to cancel the update entirely, then you can do
something like saving the record to a mirror file (or, perhaps, a "temp"
qualifier in the current file). The problem then is what to do if they do
lose their connection. You need some way of keeping track of what record
their temp copy was saved in.
The other option is to save the original version of the record in the other
file, and restore the record from there should the user wish to cancel the
update.
In either case, delete the temp copy when you come out of update mode.
Another possibility would be to save the original version of the record in
an array.
Which version you chose depends on how, exactly, you want the "user's
connection was lost" and "user wants to cancel the update" scenarios.
Note that any of these "save a temp copy in a lookup" scenarios have the
possibility of race conditions if not coded properly.
--
Kenneth Brody
More information about the Filepro-list
mailing list