Locked command question

Don Coleman dcoleman at dgcreact.com
Wed Aug 3 09:20:20 PDT 2005


I have a table that I need to test for two different situations.  First 
if the lookup fails and secondly if the record I am looking to is 
locked.  This is the first time I am using the locked command and I am 
getting an unexpected result in the following test table:

   1 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: end
   2 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@KEYT    If:
       Then: AA(4,ALLUP)="OC  "
   3 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: lookup req = labelreq  k=AA   i=A -npxw
   4 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: not req
       Then: beep;msgbox "\r Patient group OC not found";end
   5 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: LOCKED(req)
       Then: beep;msgbox "\r Patient group OC is locked";end
   6 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: end

If I am not in update mode on patient group OC I get no error message as 
expected.  However, if I am in update mode on record OC the error 
message I receive is line 4 - Patient group not found and not the 
expected message found on line 5.  Do I need to rearrange the tests 
being performed on lines 4 & 5 or do I have something wrong on my lookup 
flags.  I see in the help files & on-line manual that I must use the -p 
& -w flags.  This is my first use of the -w flag.  fP v5.0.6DN9 on 
WIN98SE laptop.  This programming will be used on a WIN2000 Advanced 
Server network with WIN2000 & XP Prof. clients.

Don Coleman


More information about the Filepro-list mailing list