View with advanced, multiple criteria.

View with advanced, multiple criteria.

I've defined the following function to determine the Users that haven't been assigned to a Project.
The function browses the Add_a_New_User table for all Users and verifies if each User is contained in the Assign_Project table.  If so, the User_Name is added to userList.

  1. list lookup.Unassigned_Users()
  2. {
  3.     userList = List();
  4.     for each rec in Add_a_New_User  [ID != 0]
  5.     {
  6.         if (count(Assign_Project[User == rec.User_Name])  <=  0)
  7.         {
  8.             userList.add(rec.User_Name);
  9.         }
  10.     }
  11.     return userList;
  12. }
I've been trying to define the criteria a View that would contain only the users found and added to the userList.
Does anybody have an idea how this can be achieved?