Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3999 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!

 

Posted

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..

  • Like 1
Posted

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.

  • Newbies
Posted

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

  • Newbies
Posted

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?

This topic is 3999 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.