Record lock issue when performing lookup within current file
Josh Reader
josh.reader at mercuryelectronics.com
Wed Jun 15 13:57:19 PDT 2016
1. CentOS 7 and filePro v5.8
2. It's triggered on save
3. Yes there could be someone else updating or creating a new record but
it shouldn't be for the same PO #
On Wed, Jun 15, 2016 at 4:47 PM, Richard Kreiss <rkreiss at verizon.net> wrote:
> First Question: what Operating system and version of filePro are being run?
>
> Second question: Is this subroutine triggered by an @key? If so, that
> will lock the record the user is looking at. There really is no way around
> that issue.
>
> Third Question: Are multiple people putting in details at the same time as
> someone is trying to run this routine?
>
>
> Richard Kreiss
> GCC Consulting
>
>
>
>
>
>
> > -----Original Message-----
> > From: Filepro-list [mailto:filepro-list-
> > bounces+rkreiss=verizon.net at lists.celestial.com] On Behalf Of Josh
> Reader via
> > Filepro-list
> > Sent: Wednesday, June 15, 2016 3:27 PM
> > To: filePro Mail Group <filepro-list at lists.celestial.com>
> > Subject: Record lock issue when performing lookup within current file
> >
> > Hi All,
> >
> > I am trying to program a feature for our purchasing dept and running
> into some
> > lock issues. Currently when our buyers have a PO line with multiple
> releases they
> > have to manually add the total cost of the line and then hand-type that
> into
> > filePro for each release. If they make a mistake, then they have to
> touch all
> > releases on the line to manually synchronize the line cost. I added
> code to do a
> > lookup within the file and to only apply for my own ID while I tested
> it. During
> > test everything worked perfectly.
> > I didn’t have to enter the line cost field at all. As I added releases
> it
> > automatically added the totals and then went back through the other
> records
> > and synchronized as expected. Once I made it live however, and multiple
> > people were using it at the same time, I started getting calls about a
> message
> > saying waiting for record # to unlock. I commented out the subroutine
> that runs
> > the sync after the screen command @update, got everyone back to the main
> > menu and in again and they proceeded on the old way. Is it possible to
> sync a
> > field across multiple records of a file that
> > 2-3 people are adding records to regularly? If so what is the proper
> way to do
> > the lookup?
> >
> > Below is the subroutine that does 2 lookups. The first lookup adds up
> the qty
> > and cost for the line and stores them in variables. The second lookup
> applies
> > those values to all releases for the line. This happened a few weeks
> ago and I
> > believe I removed the close command from the lookups thinking that may
> make
> > a difference but hadn’t tested it since then. Also I’m using the same
> lookup
> > name but it is my understanding that only one lookup to a file is
> allowed at once
> > and when a second lookup is invoked the first one closes automatically.
> We are
> > on filePro v5.8 running on CentOS 7. Any help would be greatly
> appreciated.
> >
> >
> > syncLN:' ---------------------------------------------------------------:
> > ' Subroutine to sync line qty and line cost:
> > :' Set variables for line cost and line qty :lc=79; lq=43:
> > :' Lookup within reqform by po #
> > :lookup req = reqform k=24 i=E -nx:
> > :loopSYN:not req
> > :goto syncLN2:
> > :req(24) ne 24 ' PO #'s no longer match, return
> > :goto syncLN2:
> > :req(22) ne 22 ' Lines are not equal, get next record
> > :getnext req; goto loopSYN:
> > :req(23) eq 23 ' Don't access current record
> > :getnext req; goto loopSYN:
> > :' Add line cost and line qty
> > :lc=lc+req(79); lq=lq+req(43):
> > :' Get next record in lookup and process it :getnext req; goto loopSYN:
> > syncLN2:' Lookup within reqform by po #
> > :lookup req = reqform k=24 i=E -npx:
> > loopSY2:not req
> > :return:
> > :req(24) ne 24 ' PO #'s no longer match, return
> > :return:
> > :req(22) ne 22 ' Lines are not equal, get next record
> > :getnext req; goto loopSY2:
> > :req(23) eq 23 ' Don't access current record
> > :getnext req; goto loopSY2:
> > :' Update record with line cost and qty
> > :req(78)=lc; req(44)=lq:
> > :' Get next record in lookup and process it :getnext req; goto loopSY2:
> >
> >
> > Thanks,
> > Josh
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <http://mailman.celestial.com/pipermail/filepro-
> > list/attachments/20160615/9c378937/attachment.html>
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > Subscribe/Unsubscribe/Subscription Changes
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20160615/4d768f00/attachment.html>
More information about the Filepro-list
mailing list