LOCAL lcEmployeeID *-- An order must have an employee ID associated with it *-- For the purposes of this sample application, we will *-- attempt to use the employee ID for the currently logged in *-- employee. If the oApp object does not exist (i.e., we are not *-- running the application), we will attempt to retrieve an arbitrary *-- employee ID from the employee file lcEmployeeID = "" IF TYPE("oApp") == "O" lcEmployeeID = oApp.GetEmployeeID() ENDIF IF EMPTY(lcEmployeeID) USE tastrade!employee AGAIN IN 0 ALIAS emp lcEmployeeID = emp.employee_id USE IN emp ENDIF RETURN lcEmployeeID