July 28, 200619 yr 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, 200619 yr by Guest error in code
July 28, 200619 yr 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.
July 28, 200619 yr 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