Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Filtered relationship showing only first related value


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

Recommended Posts

Posted

I have a bird database with 2 tables:  The Species table has one record for every bird species in California.  The Observations table has one record for every observation of each species.

 

So, for example, there may be 27 observation records of the "Western Bluebird" species in 2013.

 

I need a relationship that will give me a subset of the first observation record for each unique species.

 

I have an existing relationship that results in a single record per species, visible from Observations table.  This allows me to see a list (in a portal) of each unique species observed, but because the unique species name (1 species per record) comes from the Species table, it does not show me (for example) the date and location of the observation.  These fields reside in the Observations table.

 

So I need a way to get just a single observation record (the first) for each unique species observed.

 

I had thought this would be fairly easy, but I built several test relationships, and none are able to provide this result.

 

Any ideas?  Thanks in advance for your help.

Posted

You need a relationship between Species and a new TO of Observations  Species::ID =  NewObservations::SpeciesID .  Sort the relationship by Observations::date (increasing).  Then put the fields you desire from NewObservations on a  Species layout.  Only the first record which fits the relationship will be shown in these fields (which is the earliest, because of the sort).

 

Now, to see only species that have been observed, create a calculated field in the Species table ObsCount = Count(NewObservations::ID).  Do a find for ObsCount > 0 to see only the observed species.

This topic is 4336 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.