scolesm Posted July 28, 2006 Posted July 28, 2006 (edited) 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 July 28, 2006 by Guest error in code
Ender Posted July 28, 2006 Posted July 28, 2006 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.
scolesm Posted July 28, 2006 Author Posted July 28, 2006 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.
Recommended Posts
This topic is 6695 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 accountSign in
Already have an account? Sign in here.
Sign In Now