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

Featured Replies

Hey all you FileMaker...ers

Is there a more efficient way to loop through found records than the following:

Go to Layout [Layout1(Layout1)]

Set Variable [$ItemNum;Value:Layout1::Item Number]

Go to Layout [Layout2(Layout2)]

Enter Find Mode []

Set Field [Layout2::Item Number;$ItemNum]

Go To Record [Last]

Set Variable [$LastLot = Layout2::Lot Number]

Loop

.

.

.

Exit Loop If [$LastLot; Value:Layout2::Lot Number]

End Loop

Either that or is there a way for the script to find out how many records were found?

Thanks a lot,

M

Edited by Guest
error in code

Since you've omitted the contents of the Loop, it's hard to tell what you're trying to accomplish here.

Also, what are the TOs (table occurences) "Layout1" and "Layout2"? Are they related? If so, how?

Either that or is there a way for the script to find out how many records were found?

The function Get(foundcount) will tell your script how many records are in the found set.

  • Author

Ender,

Yeah, I realize that it's pretty vague what I'm doing here (I try not to be so vague, but the entire loop is quite lengthy and my question's just referring to my looping method, I'm content with it's contents). This is just a general loop that I've been using to make changes to fields in all found records.

It generally just contains Set Fields.

As a programmer, I was just interested to see if there's a more effective way to do this.

And thanks for the Get hint. I always look over how many things that function can handle.

Thanks!

Edit:

And yes, the two layouts are related, by Item Number. Layout2 simply has many occurences of Item Number differentiated by multiple Lot Numbers.

Create an account or sign in to comment

Important Information

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

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.