Filtering Out options from a LookUp field

Filtering Out options from a LookUp field

Hi Everyone

Trying to make a form with a lookup field that will only show things in the Lookup field that do NOT already have a tracking number associated with them in the original report
  1. //once Sample has a US tracking number
  2. //that Sample should never again show up in the SampleLookup (named Samples_Included)
  3. //
  4. //so clear the lookup field
  5. clear Samples_Included;

  6. //get all possible Sample_ID_Descriptions from the Original form
  7. FetchID = Sample_Order_Form[ID != 0].Sample_ID_Description;

  8. //for all records in the oringal form that have NOTHING in the Tracking to US field, add their Sample_ID_Descriptions to the Samples_Included lookup field
  9. for each Sample in Sample_Order_Form [ Tracking_to_US_Office == null ]
  10.     {
  11. Samples_Included.add(FetchID);
  12.     } 

In the form, it just shows "No Matches Found"



Any assistance?

Thanks!!!