clear/flush @bk
Tom Aldridge
toma at aldridgeinc.com
Wed Sep 5 13:01:21 PDT 2012
On 9/5/2012 1:20 PM, Kenneth Brody wrote:
> On 9/5/2012 1:57 PM, Tom Aldridge wrote:
>> On 9/5/2012 9:01 AM, Kenneth Brody wrote:
>>> On 9/4/2012 5:16 PM, Tom Aldridge wrote:
> [... mesgbox and @bk ...]
>>>> Do a lookup
>>>> If no records found, do you want to add a record? Y/N.
>>>> Answer is N
>>>> Move to next field.
>>>> Do a lookup
>>>> If no records found, do you want to add a record? Y/N
>>>>
>>>> Answer is already "N"
>>>>
>>>> Wanting @bk reset after the first question.
>>>
>>> What do you mean "answer is already 'N'"? Yes, @BK contains "N", but so
>>> what? Once you execute the second mesgbox, the previous value of @BK is
>>> gone, and it will be set to the answer of the second mesgbox.
>>
>> Sorry I didn't explain it sufficiently in my example, but Richard Kreiss'
>> answer of setting another variable and testing for that, solved the
>> problem.
>> Thanks.
>
> Although you have found something with "works", we still have no clue as
> to what your problem was, nor why Richard Kreiss' answer "worked".
>
> Can you please "explain it sufficiently"?
>
Sorry, just knee deep into things. Thanks for your assistance by the way.
Here is the way it was, and below that, they way it is now.
Screen:
Meals *ay
Breakage *az
Input processing:
@wukay
If: @sk eq "DPRT"
Then: "call/MEALS"; break off
@wukaz
If: @sk eq "DPRT"
Then: "call/BREAKAGE"; break off
Call table: MEALS
If :
Then: declare extern ssn
If :
Then: lookup mealacntdet k=(ssn) i=A -nx
If : not mealacntdet
Then: cls("22"); msgbox "No \r Meal \r Records Exist. Add
Record?","Y/N","yn"
If : @bk eq "N"
Then: end
If : not mealacntdet
Then: goto addmeal
If :
Then: lookup browse mealacntdet...
(There are no records in mealacntdet and msgbox answer is N to add records.)
Call table: BREAKAGE
If :
Then: declare extern ssn
If :
Then: lookup brkacntdet k=(ssn) i=A -nx
If : not brkacntdet
Then: cls("22"); msgbox "No \r Breakage \r Records Exist. Add
Record?","Y/N","yn"
If : @bk eq "N"
Then: end
If : not brkacntdet
Then: goto addbrk
If :
Then: lookup browse brkacntdet...
There are records in BREAKAGE, so processing drops to @bk eq "N" and
ends, which is not what I want. Now I'm thinking I simply could jave
added "not brkacntdet" before the @bk eq "N". i.e. not brkacntdet and
@bk eq "N"
===========================
Anyway I did the following using another variable for @bk
If :
Then:declare extern yesno, ssn:
If :
Then:yesno=""
If :
Then:lookup brkacntdet k=(ssn) i=A -nx:
If :not brkacntdet
Then:msgbox "No \r Breakage \r Records Exist. Add Record?","Y/N","YN":
If :not brkacntdet
Then:yesno=@bk
If :@sk eq "BRKY"
Then:goto prebrkg
If :yesno eq "N"
Then:end
If :not brkacntdet
Then:goto addbrk
If :
Then:lookup browse brkacntdet...
Tom Aldridge
More information about the Filepro-list
mailing list