Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Looping through portal records to update field in related table

Featured Replies

  • 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!

 

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

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.

  • 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

  • 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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.