Jump to content

This topic is 8138 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

This topic is 8138 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.