Looping through portal records to update field in related table

387 Views Asked by At

in filemaker, i have a purchase order table that has a portal with items listed. i want to update the inventory table with the number of items on order for each item in the portal. i tried using a loop that ends with Go to Portal Row [Select;Next;Exit after last], but the loop continually updates the quantities for each of the items in the portal, rather than updating one and moving to the next. what step am i missing?

Thanks!

1

There are 1 best solutions below

0
Fitch On

Most likely your script is going to another layout or something that causes the portal to lose focus. The result is that it keeps starting over. You'll need to set a variable to the portal row number and then go to row by calculation, or something along those lines.

I'd highly recommend FileMaker Pro Advanced -- it has a debugger that allows you to run your script one step at a time so you can find the problem.