Getnext question
Walter Vaughan
wvaughan at steelerubber.com
Tue Apr 4 06:14:31 PDT 2006
Don Coleman wrote:
> I have the following input processing which uses @KEY to generate
> prescription labels using getnext. This app. was running fine until March
> 24. There is nothing that was changed with regard to this @KEY routine that
> I can think of (or see). However, there were several additional @KEY
> routines added since March 24. The @KEY routine in question does find the
> first prescription correctly but fails all subsequent lookups & tests for
> variables CC & CD. Yet If I enter the same exact search data via *clerk it
> finds each and every match.
[...]
ready If: AC eq ""
Then: INPUT POPUP AC(9,.0,g) "\r Scan Rx label queue ID#: \r "
12 ------- - - - - - - - - - - - - - - - -
If: AC eq ""
Then: end
13 ------- - - - - - - - - - - - - - - - -
If:
Then: INPUT POPUP AD(13,*,g) "\r Scan Medication NDC: \r "
14 ------- - - - - - - - - - - - - - - - -
If: AD eq ""
Then: end
15 ------- - - - - - - - - - - - - - - - -
If:
Then: ZE(3,.0,g)="1";CC(8,*,g)=""{AC{"";CD(11,*,g)=""{AD{""
16 ------- - - - - - - - - - - - - - - - -
If:
Then: lookup ndc = crossndc k=AD i=A -nx
17 ------- - - - - - - - - - - - - - - - -
If: not ndc
Then: goto nocross
18 ------- - - - - - - - - - - - - - - - -
If:
Then: AD=ndc(1);AE=CC&CD;goto gotcros
19 ------- - - - - - - - - - - - - - - - -
nocross If:
Then: AE(19,*,g)=CC&CD
[...]
What you state as your problem isn't even a filePro problem. CC and CD are just
the values you scanned into AC and AD with whitespace removed from both ends.
What about poping a message box between line 15 and 16 and display your results.
I dont understand why you strip off the whitespace in AD to create CD and then
use AD in line 16 as a lookup.
You don't sell this software into any drugstores that any of my family might
use, do you? You don't seem to be handling all conditions... or at least it's
confusing (to me). Why are line 22 and 23 the same?
I'm never comfortable using "lookup -" within a processing table unless I'm
replacing the normal IUA entry into records. You're just using it to move to a
different record to stand on. Is that the problem, you are not moving to the
record you expect?
You have got "getnext"'s all over the place. Perhaps you should be goto-ing a
single place that handles all the conditions and does the getnext in a more
orderly fashion. Heck, what's the structure of Index "C". Does getnext inside
index "C" even move in the direction you expect?
There is one convention that I "really like" in the comp.databases.sql.mssql &
mysql groups that if you *really* want an answer you have to "post the code"
"post your file layout" "post some sample data" and "post the results you are
wanting". In those environments someone can cut and paste in a matter of seconds
and help with your problem. I have seen the most g*dawful selects cleaned up and
explained in this manner, once the original poster documented the problem
favorable to those helping.
It would be helpful here.
--
Walter
More information about the Filepro-list
mailing list