lookup file locked
Laura Brody
laura at hvcomputer.com
Thu Oct 21 12:50:49 PDT 2004
On Thu, 21 Oct 2004 14:11:45 -0400, Nancy Palmquist <nlp at vss3.com> wrote:
> Faisal Karim wrote:
>
>> Is there any way I can display in filepro if someone is updating a record. Currently filepro puts a message on the bottom that the record# is being updated, but it does not show who is updating it. Does anyone in this group know a solution for this. I am running 4.8.12 in open server. Thanks in advance.
>> Faisal Karim
>> ------------------------------------------------------------------------
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
> This will require 5.0.
>
> There is a function LOCKED() which will tell you if a record is locked so you can check for it.
You also need the -w and -p flags in the lookup.
Here is the entry in my product "Laura's Help Files and Quick
Reference Guide" (available for purchase at my website) for
the LOCKED() function:
(Note: the double \\ characters are displayed as a single \, and
the \r toggles the inverse color.)
v4.5 \r LOCKED(lookup) \r - Test if a lookup record is currently locked.
Note: Must be used in conjunction with a lookup statement which
includes both a -w and -p flag.
Example:
getzip if:
then: lookup zip=zipcode k=ky i=a -npxw
if: LOCKED(zip)
then: goto ziplkd
......
ziplkd if:
then: p = "Press \\r Y \\r or \\r N \\r"
then: msgbox "Zipcode \\"" { ky { "\\" is locked.\\nTry again?",p,"YN"
if: @BK eq "Y" ' Pause for 5 seconds and try again.
then: sleep "5000" ; goto getzip
See also: LOOKUP
--
Laura Brody, Publisher of the filePro Developer's Journal
+------------- Hudson Valley Computer Associates, Inc ----------+
| PO Box 859 120 Sixth Street http://www.hvcomputer.com |
| Verplanck, NY 10596-0859 Voice mail: (914) 739-5004 |
+------ PC repair locally, filePro programming globally --------+
More information about the Filepro-list
mailing list