getnext and loop?? - braindead question
scooter6 at gmail.com
scooter6 at gmail.com
Wed Oct 13 08:49:41 PDT 2010
Okay, in the midst of a gazillion projects so my mind is not thinking
clearly...
We previously had a process called within a screen that requests a letter to
be sent.
We have processing in place that USED to work but doesn't seem to now?? Or
perhaps it's been broken a while and we never caught it...who
knows...anyways...
>From a screen, we can hit '4' to request a letter....it then looks up the
letter file and is supposed to check the 'most recent date' we sent a letter
and if that date is
less than 14 days from today's date, it's supposed to errorbox "last letter
was sent" <x<"days ago, please make sure you wait 14 days";exit etc
So in checking this out, it appears it's only grabbing the FIRST record that
matches the account number (which is how we lookup to the letter file)
So, the way it SHOULD work, is the lookup should look in the letter file at
ALL records that match the account number and find the MOST RECENT letter
and compare the date to today's date, etc......
I put a piece of code in to show me what value it was checking - apparently
it's only finding the first record it locates by the account number and it's
checking against THAT date --
How can I put processing in place to lookup to the letter file by account
number, then locate the most recent date instead of just the first record it
finds?
i.e. letter file contains 4 letter records for account number 123456 (it
does a lookup by account number from our master file)
The 4 letter requests were sent on:
01/05/10
02/17/10
05/26/10
10/07/10
Right now, when I put my msgbox to show me what date we're checking against,
it's locating the first record, and checking today's date vs. 01/05/10 - and
since it's more than 14 days ago, it allows them to request another letter -
obviously not what I want to happen.....it needs to see we printed the last
letter 6 days ago and should not allow them to request another one, etc.....
Thanks
Scott
PDM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20101013/8085ba62/attachment.html
More information about the Filepro-list
mailing list