3 Replies Latest reply on Oct 29, 2013 7:00 AM by philmodjunk

    Find empty portal records

    ChrisPink

      Title

      Find empty portal records

      Post

           A simple thing (I assume) but I have searched and can't find it.

            

           I have records (customers) with a related record portal (bookings) - I want to find those records who have no portal records. The 'obvious' way - to type '=' in the unique ID doesn't work because, of course, all related records have an ID.

           So how do I find those records with an empty portal ie customer who have made no bookings?

        • 1. Re: Find empty portal records
          ChrisPink

               OK, bad practice answering your own question but in case anyone treads this way,  here's a workaround. 

               Sort all the records on a portal field (booking date), descending so empty ones come first

               This will put the empty portals in a block. Find the first  non-empty by quartering, omit the remaining records and there are all the records (customers) with no portal records (bookings)

                

               (you can always fool a computer)

                

          • 2. Re: Find empty portal records
            gcatnine

                 to make it simpler:

                 just create a calculated field in which have this calculation

                 IsValid(Table::Your_Related_field)

                 in the field you will have 1 (true) fir the customer records that have booking related records and 0 (False) for the ones that do not have related records

                 so, it will be easy to search for 0 or 1 in this new field

            • 3. Re: Find empty portal records
              philmodjunk

                   Or use the = sign in a field in your portal, but use a field other than the foreign key field. You may want to search on a layout based on the portal's table as searching on the current table would find all records in your layout's table that has at least one related record where the specified field is empty.