Search and Sort by Multiple Lookups

Search and Sort by Multiple Lookups

We are a community college. I have one report for instructors and one report for course schedule. I want to create a Course_Schedule_Search form that allows the user to pick an instructor from a lookup field and, in a multi-select lookup field, show only those courses in course schedule that the selected instructor is teaching. 

However, I'm having trouble with the "on user input" code. I keep getting an error, and I think it relates to the ID. Here is my "on user input" code for Find_Instructor lookup:

  1. if (Course_Schedule[Instructor = input.Find_Instructor].count()  >  0)
     {
        courses  =  Course_Schedule  [Instructor = input.Find_Instructor] sort by  CourseList ;
        Select_Courses:ui.add(courses.CourseList.getall());
     }

Both the Instructor in the Course_Schedule form and the Find_Instructor lookup in the Course_Schedule_Search form are lookups referencing the Add_Employee form and store as BIGINT - I assume this is the ID for entries into Add_Employee, so I think we should be good. I've even run tests like 

  1.       test1 = input.Find_Instructor + "";

To demonstrate in a string field what is being used for Find_Instructor, and it's identical to entry ID for that record in Add_Employee.

The CourseList field referenced in the code is a string field storing course title.

I've done this same operation a couple of years ago and had it working but now I cannot figure out how to fix my problem. 

Anyone have any thoughts about this?