Changing Records, How-To

Stanley - stanlyn-com stanley at stanlyn.com
Mon Nov 19 11:38:01 PST 2012


Hi,

 

I'm sort of embarrassed to ask such a question after the hundreds of
thousands of filepro coding I've written.  I guess the old saying "If you
don't use it, you'll lose it" is true.  So anyway here goes.

 

1.

I'm in the customer table and after copying the current record to a new one,
I now want to move to that record with it shown on the screen (or the focus
moved to it).  I can get the record # of the newly created record and do a
lookup with the record #.  I've tried that and added a display after the
lookup and it doesn't change to the new record.  Here is some code.

 

@keyT

.         I'm in the cust table

.         I created a new customer record and saved its record number to a
declared variable "lnRecNum"

 

If:

Then:  yi=lnRecNum

 

If:

Then: lookup cust = customer  r=yi   -n

 

If:

Then: display

 

If:

Then: End            '  the @KeyT processing

 

The record I was on when pressing the T key is still there as it did not
change.

 

 

2.

One other thing,  I declared the variable "lnRecNum", but cannot use it with
the lookup statement, hence me writing it to a new variable "yi".  Why
cannot the declared variable be used with the lookup statement.

 

Works: lookup cust = customer  r=yi   -n

Fails: lookup cust = customer  r=lnRecNum   -n

Thanks, 

Stanley

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20121119/03b5644c/attachment.html 


More information about the Filepro-list mailing list