George from Pittsburgh Posted July 20, 2007 Posted July 20, 2007 I need a workaround for GTRR. I begin in a layout showing courses in a portal. I click on a course button and execute a script which sets local variables for the Content Area ID and Course ID. I then go to a Course layout which shows objectives in a portal, find the selected course, find the rest of the courses in the content area of the course and although I have the desired subset of courses showing in the course portal and the selected course highlighted, I do not have the related objectives in the objectives portal. To get them I must click on the highlighted course which executes a script to find the related records. The problem is although I see the desired course highlighted, the second "find" defaulted the filtered portal to the first record in the set. See attached and see subsequent posts. Thank you for any help
George from Pittsburgh Posted July 20, 2007 Author Posted July 20, 2007 (edited) Attached is the initial layout. Edited July 20, 2007 by Guest
Fenton Posted July 20, 2007 Posted July 20, 2007 I don't know exactly what anything is; showing us a portal in Browse mode doesn't tell us what its relationship is. Both of your Picture_4's are the same. But I don't know that any of that matters. Basically your 2nd Perform Find is overwriting the 1st Find. It should maybe be Constrain Find. But I can't tell really what you're doing. Because you stop after the 1st Find and set a global field to an ID, as if you were going to use it, but then never do.
mr_vodka Posted July 20, 2007 Posted July 20, 2007 I would set global fields with your courseID and then use a relationship keyed on this global field to the CourseID field in your Objectives table. This would then filter your portal records via the relationship instead of a find.
George from Pittsburgh Posted July 20, 2007 Author Posted July 20, 2007 Fenton, Sorry about sending a double of the layout. The global field that you pointed out is a remnant from an earlier attempted solution. The "Constrain Find" did the trick. See attached. Thanks for your help.
George from Pittsburgh Posted July 20, 2007 Author Posted July 20, 2007 Thanks for your note. I have found the solution. See attached.
Fenton Posted July 21, 2007 Posted July 21, 2007 The thing is, both of your Finds seem to be on records of the same table. A Constrain Find in that case is really no different from just setting both of the field's criteria in your 1st Find. The default Find in FileMaker when you put data in 2 fields is an AND find; only records that have data matches in both fields. Usually you use Constrain Find for some other reason, such as that the 2nd field cannot be indexed; in that case a 1st Find on an indexed field, then a Constrain Find on the unindexed field will be considerably faster than just doing 1 Find. But otherwise...
Recommended Posts
This topic is 6394 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