New record trigger
George Simon
flowersoft at compuserve.com
Fri Mar 20 12:29:10 PDT 2015
Assuming you used "escape" to save the record or the user hit the Esc key to
save the record, the processing always goes to the top of the table unless
processing took the user somewhere else from where he/she could hit the Esc
key or there was a pushkey "[save]" command.
In that case, processing continues from that point and does not go to the
top of the table.
Take this code, for example:
::end:
@wlf1:::
::gosub TEST:
::msgbox "Line 4":
::cls("12","1"):
::end:
@wef2:::
::end:
@wef3:::
::end:
TEST::show ("12","30") "Hit the Esc Key...":
::wk=waitkey:
::cls("12","1"):
:@sk="" and @sk ne "entr":pushkey "[save]"; return:
::return:
With this code, the record will never get saved from the TEST subroutine
ever if the user hits the Esc key.
When the user hits Esc from the TEST subroutine or just presses the space
bar and processing does the pushkey "[save]", the processing will not go to
the top of the table, it will go to the msgbox "Line 4" line and the Esc
press or the pushkey [save] will be ignored.
To save the record the user will have to hit the Esc key or another pushkey
"[save]" encountered in fields 2 or 3.
However, if the :@sk="" and @sk ne "entr":pushkey "[save]"; return: line is
changed to...
:@sk="" and @sk ne "entr":escape; return:
Processing will go to the top of the table and the record will be saved from
the TEST subroutine.
On new records, unless a "write" is issued, @cd will always be ="" until
input processing is finished.
As soon as the auto table runs after the input processing has finished, @cd
will always be ne "".
-----Original Message-----
From: Filepro-list
[mailto:filepro-list-bounces+flowersoft=compuserve.com at lists.celestial.com]
On Behalf Of Jay Ashworth
Sent: Friday, March 20, 2015 10:35 AM
To: Richard Kreiss; 'Kenneth Brody'
Cc: 'FilePro Mailing List'
Subject: RE: New record trigger
Nope. The first time you run input after SAVE, the record's not written
yet.
On March 20, 2015 10:28:14 AM EDT, Richard Kreiss <rkreiss at verizon.net>
wrote:
>
>
>> -----Original Message-----
>> From: Kenneth Brody [mailto:kenbrody at spamcop.net]
>> Sent: Thursday, March 19, 2015 4:56 PM
>> To: Richard Kreiss
>> Cc: 'FilePro Mailing List'
>> Subject: Re: New record trigger
>>
>> On 3/19/2015 4:41 PM, Richard Kreiss wrote:
>> >
>> [...]
>> > As I recall, once a record is saved, @cd should equal @td and not
>be empty.
>>
>> You recall partially incorrectly.
>>
>> Yes, once the record is "saved", @cd will be filled in. But, when
>creating a new
>> record input processing is done before the record is actually
>"saved".
>> Therefore, @CD is still blank.
>>
>> > The record is saved and any additional processing happens until it
>> > hits and end form the top down.
>> >
>> > Try this after the record is saved.
>> > :@cd = @td;msgbox"Student ID A"<41
>>
>> That will not execute for a new record.
>>
>> > In my input processing tables, the end routine is always at the top
>as
>> > this is where the processing goes. In some tables, I test if a
>> > sub-routine "finish" has run, then the record is saved again and
>the
>> > processing continues from the top down.
>
>Ken,
>
>I was referring to when the user (Windows) presses F10 or reaches a
>"SAVE" in processing.
>
>Is not the record written at that point and the processing moved to the
>top of the table?
>
>Richard
>
>
>
>_______________________________________________
>Filepro-list mailing list
>Filepro-list at lists.celestial.com
>Subscribe/Unsubscribe/Subscription Changes
>http://mailman.celestial.com/mailman/listinfo/filepro-list
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mailman.celestial.com/pipermail/filepro-list/attachments/20150320/1d
b8a974/attachment.html>
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list