Table 1: Clients
Table 2: Attendance
These two tables are related through a cartesian join. ( Client Id )
My question is like this: I want to display a list of all the clients that attended today. I have a layout that is based on the Clients table, and a portal that is based on the Attendance table, filtered to display the clients that attended today. The user can sign in and sign out, and then sign in again. This causes the user's name to appear twice (or as many times as he signs in) in the attendance portal.
I would like to have a portal that only shows the unique client list of the clients attended.
Any ideas?
Well, you could filter the portal, but ... with a Cartesian product join, this will get slower and slower as you add more records. I would suggest you change your structure to something like:
Viewer -< Attendance >- Clients
The Viewer table needs only a global date field (or an unstored calculation field showing today's date, if that's all you ever want to see). And actually you can use a TO of one of the existing tables for this, if you don't want to add a new table.
Make the relationships:
Viewer::gViewDate = Attendance::Date
and:
Attendance::ClientID = Clients::ClientID
Place a portal to Clients on a layout of Viewer and you're done.