<div dir="ltr">

<p class="">1.<span style="mso-spacerun:yes">  </span>CentOS 7 and
filePro v5.8</p>

<p class="">2.<span style="mso-spacerun:yes">  </span>It's triggered
on save</p>

<p class="">3.<span style="mso-spacerun:yes">  </span>Yes there could
be someone else updating or creating a new record but it shouldn't be for the
same PO #</p>

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