Changing Records, How-To

Ian Wood iwood51 at gmail.com
Mon Nov 19 12:04:54 PST 2012


Stanley, your first question has been answered by Bill in regards to
utilizing lookup -

As far as your second question, try putting InRecNum in parentheses, I use
long variable all the time in lookups with a key field and it requires the
parentehses, I haven't tried with record number lookup though

lookup cust = customer r=(InRecNum)  -n


On Mon, Nov 19, 2012 at 2:38 PM, Stanley - stanlyn-com
<stanley at stanlyn.com>wrote:

> 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
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20121119/ac6cd12f/attachment.html 


More information about the Filepro-list mailing list