2 Replies Latest reply on Sep 5, 2012 11:07 AM by philmodjunk

    Script Find with empty criteria



      Script Find with empty criteria


      I have a Members db with a Members table that is related 1 to many to Dues.  Dues is in a portal on the Members layout.

      The relevant 2 fields are :  Members:: MEMCan (holds either "Member" or "Candidate"
      and Dues::Date  (Holds the date of the dues payment)

      I want to script a Find that will include MemCan="Member" and Omit Dues::Date= [blank or isempty(Dues::Date]

      I seem to remember some counterintuitive trick that expresses an empty criteria.  I have tried:



      ... these don't work.  Can you nudge me in the right direction?

        • 1. Re: Script Find with empty criteria

          Perform Find

          Create a Find Request.  Change action to omit.  Criteria is just an equal sign  =

          • 2. Re: Script Find with empty criteria

            Performing a find where the criteria specified is put in the field of a related table can produce results different from what you expected.

            To find all Donor records where MemCan is "member" that do not have any related Donor records with a value in the Dues::Date field:

            Enter Find Mode []
            Set Field [ Donor::MemCan ; "Member" ]
            Set Field [ Dues::Date ; "*" ]
            Set Error capture [on]
            Perform Find []

            Note the bold face text. If there is one related record with a date in this field and another related record where the date field is empty, this script will include the donor record in the found set.