You've gotten off to a good start, but here's a way to re-arrange these tables in a relationship that will list all issues and then an object in the portal row can indicate whether or not that issue appears in the join table for a given subscriber.
Subscriber::anyField X Issues|All::anyfield
Issues|All::__pkIssueID = Mailings|All::_fkIssuesID AND
Issues|All::gSubscriberID = Mailings|All::_fkSubscriberID
You can put a portal to Issues|All and get a list of all issues. You can place a picture object--such as an image of a "tick mark" in the portal row and give it this Hide Object When Expression:
IsEmpty ( Mailings|All::_fkIssuesID )
The final details:
gSubscriberID is a field with global storage. It needs to be assigned the correct value via a script. You set up the OnRecordLoad trigger to run this simple script:
Set Field [Issues|All::gSubscriberID ; Subscriber::__pkSubscriberID ]
Thanks for the quick answer ! Unfortunately there's quite a few concepts in your response I don't (yet) manage to get my head around for being really new to FM, and I'm afraid it'd take me forever before I manage to implement this. I was however thinking about the issue and wanted to run an alternative idea by you and have your thoughts: each time a new issue or a new subscriber is created, one of two scripts would run automatically:
- go to issues table
- set a variable with id of new issue
- go to subscribers table
- set variable (array ?) with value of the summary field of list of existing subscribers IDs
- go to join table
- loop through values in subscriber ID list, and add entry with: issue_id, subscriber_id, distribution_timestamp (empty)
For new subscribers it would be the same process, just inverting issues and subscribers of course.
Thus, I could quite easily filter for values with timestamp filled (have been sent) and timestamp empty (not sent yet).
Would that be a feasible solution, too ? I've never played around with scripts in FM. Could the described above be scripted ?
Thanks in advance for your help !
Yes it could be scripted and doesn't necessarily replace my previous suggestion--which isn't as complex as you might think. What you describe here is actually more complex.
Note that nearly any serious work work with FileMaker requires a good grasp of relationships (my suggestion) and a good working grasp of how to create and use scripts (your idea).