JustinTorrence
6 years agoQrew Cadet
Dynamically select related record with Current User
I have a table for Orders and a table for Employees. There is an Employee record for every User in my application and there is a unique constraint on the "User" field. An Employee can have multiple Orders. I need to know a way, without setting the "User" field in the Employee table as the primary key (I have too many relationships and applications that depend on the Record ID field to do that right now) to have the "Related Employee" field of the Orders table be automatically selected when the user creates a new record.