5 Replies Latest reply on Apr 13, 2011 12:03 PM by philmodjunk

    Count of Value List Entry

    mgxdigital

      Title

      Count of Value List Entry

      Post

      Hello,

      I'm wondering how i can create counts of a field that pulls a value list.

      For example, i have a field called "contact type" This field is a drp down menu of a value list called "contact types" which results: call, email, voicemail...

      I'm wondering how i can have a field that results the count of how many times "call" is entered in contact type, and another field that reults the counts of how many times "email" is entered in contact type...and so on..

        • 1. Re: Count of Value List Entry
          philmodjunk

          There are several ways to do this provided you have one such ContactType field for every record, not multiple fields for one record...

          One simple approach is to set up a summary report.

          Define a summary field as the "count of" your contact type field.

          Create a new layout and replace the body layout part with a sub summary part "when sorted by" your contact type field.

          Place the contact type and this new summary field in the sub summary layout part.

          When you sort your records by contact type, you'll see something like this:

          Call    234
          Email 360

          There are also ways to do this.

          • 2. Re: Count of Value List Entry
            mgxdigital

            Thanks! My only problem doing it this way would be that i want the counts at the bottom of my contact log. So i want to be able to display them and not have to go to a seperate layout to see the totals.

            • 3. Re: Count of Value List Entry
              philmodjunk

              Do you need the totals for your current found set or all the records in the table regardless of the found set?

              Assuming the latter:

              Define a separate calculation field for each category value:

              If ( contact type = "Call" ; 1 )

              We'll call this first such field, cCallFlag.

              Just change the text in quotes for each additional calculation field.

              Now define a self join relationship linking your table to itself with the X operator:

              YourTable::anyfield X YourTable2::anyfield.

              Now define calculation fields for for each count. The first one would be:

              Sum ( YourTable2::cCallFlag )

              • 4. Re: Count of Value List Entry
                mgxdigital

                Great Thanks!

                It works perfectly except for i am going to want it to add the current found count. 

                The list of call items in a portal and each day a new record will be made with a new portal so that we can montior the contact activity per day.

                • 5. Re: Count of Value List Entry
                  philmodjunk

                  If you define a count of or total of summary field that summarizes YourTable::cCallFlag, you can place this field on your layout and it will compute the desired total, but will only do so for the records currently present in your found set. (No self join or additional calculation fields needed in this case.)