Order on a lookup?
-
Looking for a suggestion…
I have a data administration app that I am using to log attendance at our martial arts classes. One table holds the logged classes and then has a relationship to an attendance table which logs the individual attendees. The relationship is defined by a class ID columen. The individual rows in the attendance table then have just class ID, member ID and date columns.
In the details table from the relationship, I define a lookup so that the members name (from a third table which holds details on the member linked to the member ID), so when working with attendances the user can see a member’s name and class description rather than the underlying IDs.
However I really want to be able to order the data in the details table by the lookup rather than the ID. As I need to be able to insert, the details table needs to have the attendance table as the data source, otherwise I’d fix with a view joining the various tables (even though this would actually be an updatable view, this is not supported). So would really like to either be able to order on the lookup or on a computed field.
Any thoughts before I go for a dirty solution of copying in the name into the attendance table using a trigger on insert….
You must be logged in to reply to this topic.