October 22, 200223 yr Hi all, I'm not sure if this is the right thread in which to post this...my apologies if it's not. I'd like to set up a field that counts ONLY the records in a found set from a related file. The user will enter a date (the "end date") and FMP generates the beginning date (364 days earlier) and through a script goes over to the other file and finds the records within that date span. But the main file still seems to count ALL of the records in the related file, not just the found set. HELP!?! Thanks in advance, Leah
October 22, 200223 yr The elegant way to do this is to use a multi-key and a relationship. Set up a global text field in your primary file, relate it to the date field in your related file. Use a calculation field for the count: Count (calculation, number) = Count(Relationship::Field) <--- any populated field (serial number, etc.) Now the trick is to populate the global text field with the list of all dates you wish to include separated by carriage returns. To count all records from October 1 to 5 you need to enter: 10/1/2002 10/2/2002 10/3/2002 10/4/2002 10/5/2002 This field can be populated using a looping script or using a plug-in such as the Troi Ranges plug-in (www.troi.com). -bd
October 22, 200223 yr Author BD - Thanks for the help. Unfortunately I don't really follow. Would you mind taking a moment to walk me through it? I'd appreciate it! All my best, Leah
Create an account or sign in to comment