Updating one file from within another
Joe Chasan
joe at magnatechonline.com
Thu Apr 29 11:12:59 PDT 2004
On Wed, Apr 28, 2004 at 04:04:51PM -0400, Vicky Prigg wrote:
> I would like to, while in one file, open up a new record in another file
> and be able to post data to it and then update the new record with the
> rest of the data that I need. Right now, I am using lookup to a free
> record and posting the data over. I used a SYSTEM command to take me to
> the screen in the other file. I can't use POPUP UPDATE because I need
> some input processing to take place in the lookup file. My problem is,
> I can't tell the SYSTEM command to go into that record that I just
> created from the lookup. The SYSTEM command just takes me to index
> selection using the -xi flag. I can't even use a saved selection set
> because the value of the field changes with every record.
you should capture the record # (or some other unique key) when you
create the record.
when going into the second file via system command, pass the record
# (or other unique key) along on the command line via -r, -rw, -rx,
-ry, or -rz (these will correspond to system variables @pm, @pw, @px,
@py, and @pz, respectively.)
in the second file, use @menu processing and if that value is set in the
@pm/@pw/@px/@py/@pz - whichever you decide to use, use the "lookup - r=(that
record #" to put yourself directly onto that record - you can take it
further and put yourself into update as well as force exit from the file
when done if you want.
note - your selection set idea wasn't bad - you can still do that if
you want by either actually writing the selection set from the first
file or most easily by combining the above with a saved selection such as
"@rn eqf @pm" or "some-key-field-value eqf @pm"
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ---
-Joe Chasan- Magnatech Business Systems, Inc.
joe at magnatechonline.com Hicksville, NY - USA
http://www.MagnatechOnline.com Tel.(516) 931-4444/Fax.(516) 931-1264
More information about the Filepro-list
mailing list