December 10, 201312 yr Newbies 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!
December 10, 201312 yr I would write a script that opens a layout with the same records seen in your portal.. then do something like a loop updating those files..
December 11, 201312 yr eximius: you're probably doing something in the script that makes the portal lose its focus; if jumps off the active portal row. So when you do "go to portal row next", it has no portal row active and it jumps to the first one. As RodM mentions, typically a better approach is to do a "go to related records" to isolate the records in the portal in a new layout/window and then loop through those records.
December 11, 201312 yr Author Newbies Thank you! So I tried this, but it is not working...ideas? It updates the first item in the found set correctly, but it doesnt update the rest of the records? Go to Layout ["Transactions"(Transactions)] Enter Find Mode [] Set Field [Transactions::PO Number; $PO] Perform Find [] Go to Record/Request/Page [First] Loop Go to Layout ["Item Details"(Inventory)] Enter Find Mode [] Set Field [inventory::ItemID; $Item] Perform Find [] Set Variable [$QtyNew; Value:Inventory::Units on Hand - $Qty] Set Field [inventory::Units on Hand; $QtyNew] Set Field [inventory::Parts Orders; Inventory::Parts Orders - $Qty] Commit Records/Requests [] Go to Record/Request/Page [Next; Exit after last] End Loop
December 11, 201312 yr Author Newbies i just realized, it is probably the problem you mention above, it doesn't know which record to go to next. how do i get it back to that found set? do i have to perform the find again?
Create an account or sign in to comment