<div dir="ltr">Hi All,<br><br>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?  <br><br>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.<br><br><br>syncLN:' ---------------------------------------------------------------:<br>' Subroutine to sync line qty and line cost:<br>:' Set variables for line cost and line qty<br>: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<br>: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<br>:getnext req; goto loopSY2:<br><br><br>Thanks,<br>Josh<br><br><br></div>