A portal implies a one to many relationship:
Let's say that a field named "Data" is the field that might contain the duplicate values for which you want to filter.
Go to Manage | Database | Relationships, create a new table occurrence of your portal table and link it like this:
Set up the match fields to be:
portalTable::Data = portalTable 2::Data
then you can set up a filtered portal to PortalTable with this portal filter:
Count ( PortalTable 2::Data ) > 1
and then only related portal records that have at least one duplicate value will be visible in your portal.
A different portal filter can be used with this relationship to omit duplicates.
That did the trick!
Now, I need to count the number of times each duplicated field occurs in the context of a given portal record (patient)- how can I add this data to the portal? Much appreciated- so much to learn!
Thanks so much!!!
Hmmm, my solution may be too simple. You may need to include an additional match field so that you only match to portal table records that are linked to the same layout table record.
Say you have these relationship:
then your match fields should be:
Experiments::__pkExperimentID = Results::_fkExperimentID
Results::_fkExperimentID = Results 2::_fkExperimentID AND
Results::Data = Results 2::Data
And my previous post has the seed of what you want: Count ( PortalTable 2::Data )
if you define a calculation field in Results as Count ( Results 2::Data ) , it will return the number of results where Data is the same value that are also linked to the same Experiments record. Be sure to select "Results" and not "Results 2" from the "Context" drop down at the top of the specify calculation dialog.
Thanks, Phil- you are awesome! One last thing for ease of viewing these data- I only want to show each "duplicate" value in the portal one time, along with its count number. Is this a matter of adjusting the filter settings to only allow the first representation of the value? If this is too big of a deal, I'll leave it alone.
Add a primary key field to the results table. An auto-entered serial number is simplest in FileMaker databases. I'll call it __pkResultID. For existing records, you'll need to use replace field contents to assign a serial number to this new field.
Then modify your portal filter to be:
Count ( Results 2::Data ) > 1 And Results::__pkResultID = Results 2::__pkResultID