If I understand you correctly, that portal row will be empty unless such a related record exists. If so:
Not IsEmpty ( Attendance::MemberID )
will be true if the record exists. If MemberID is of type number you may be able to simplify this to just:
Thanks for your reply, but no. The portal lists all members.
The idea for the UI is that if the admin sees that John is present, he clicks on John's name in the portal. A record is inserted into Attendance, and John's name turns green.
However, if he clicked on Jane's name by mistake, and she turned green, he can click on her name again to delete the relevant Attendance record, and her name will return to default.
I can eventually upload my dev db somewhere that you may access if you want to take a look.
I don't think that I actually need to see the file, but a depiction of the relationships involved might be helpful. A screen shot of your relationships graph is one way to do that. But please don't just upload the screen shot, include some descriptive text telling me which table occurrence "box" is which when it comes to your layout and the portals placed on it.
This info may be enough, however to get you going:
Not IsEmpty ( FilteredValues ( List ( RelatedTable::IDFIeld ) ; LayoutTable::IDField ) )
Will be true only if the value in LayoutTable::IDField is identical to the IDField value of at least one related table record.
Member 2 is an second instance of Member.
The Layout is linked to Class.
The portal shows all records of Member 2. I want portal rows to be highlighted if there exists an Attendance record for that particular Member/Date combination.
To achieve that result, you need to refer to a new occurrence (instance) of attendance that links to Member 2 by member ID and a specified date. A global date field, for example can be defined in Member to use in that relationship and a script can update it with the value of Class::Class Date. Then my original suggestion can be used to check for the existence of a related record in this new occurrence of Attendance.
Thanks a lot! I'll try that!