2 Replies Latest reply on Jul 4, 2014 11:34 AM by abunce515

    return a number value for found records.



      return a number value for found records.


           I am looking to return a number value into a field for a found number of records.  This number value is then going to be placed on a dashboard to give a current reference.

           The number is going to return a  separate value for the number of pending sales, pending listings, and active listings.  

           Listings and sales whether pending, sold, or active are individual records in the listings table.  

           the status (pending, active) is a value with a primary key (active = "liststa000001", pending = "liststa000002").  

           Whether or not they are a listing or a sale is defined by the representation field in the listings table.  Representation is either buyer, seller, or dual (depending on whether the realtor is representing the buyer, seller, or both)  so buyer would be a sale, seller would be a listing, and dual would be a sale and a listing.  these three are defined by primary keys as well Buyer = "reptyp000001". seller = "reptyp000002", dual = "reptyp000003".


           Thanks for your help


        • 1. Re: return a number value for found records.

               But what you want aren't found counts, they are counts of how many records with a specific value in a specific field exist in your database.

               There are a number of ways to do that and each method has trade offs such that the best choice depends on what you want to do with these counts.

               Since you describe a Cartesian join relationship and only want to display these counts...

               Define a "count of" summary field in listings that counts some field, such as the primary key, that is never empty.

               Put three filtered one row portals on your dashboard layout. Put this summary field as the sole field inside the portal row of each.

               Set up each filter expression to filter for a specific value in the status and representation fields.

          • 2. Re: return a number value for found records.

                 Great answer.  Thank you.