NickFaraday Posted August 22, 2007 Posted August 22, 2007 Dose anyone know what the "scope" of a script run in FM is? Ex: I have a script that builds a many to many link table. I have a subset of a table that I get by performing a find in the script. I then loop though and build the link table with a goto "link table" command and set the appropriate fields. My question is do I need to preform the find of data each time I return to that layout. Go to layout 1 Preform Subset Find Loop Go To Table Layout A Get Unique Id A Go To Table Layout B Preform Find Get Unique Id B Go To Table Layout C Preform Find Get Unique Id C Go To Link layout Set Links Go To Layout 1 *will this take me to the same subset? Next End Loop If there are multiple users running the script will the subset be kept per user?
Ender Posted August 22, 2007 Posted August 22, 2007 Each table occurrence keeps its own found set, and that found set is the same across all the layouts that use that table occurrence. This is the same in multi-user environments (the found sets are local to each). I'd wager that there's a more efficient algorithm to do what you need, but your pseudocode is not specific enough for me to suggest something.
Fenton Posted August 22, 2007 Posted August 22, 2007 I'd agree with Ender, the info is a little vague. Table 1, Table A, Table B; these all sound like different tables, but we can't really be sure. If they are, it all looks (kind of) like it would work, and you should still be on the same record when you return to Layout 1. But one has to wonder what the Finds are, where's that criteria coming from, and why, since it's using the same criteria in different tables? You say "get unique ID B", but you've just done a Find. How do you know it's only found 1 record? Or are you planning on capturing all the IDs you found? BTW, each window maintains its own found sets. A new window will have the same as its "parent", but will not stay synched if its found sets are altered.
Ender Posted August 22, 2007 Posted August 22, 2007 BTW, each window maintains its own found sets. A new window will have the same as its "parent", but will not stay synched if its found sets are altered. Ooh, good catch, Fenton. Maybe it's my aversion to MS Windows; makes me forget about FileMaker's Windows. :
Recommended Posts
This topic is 6304 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