10 Replies Latest reply on Sep 15, 2016 6:10 PM by philmodjunk

    Count Fields

    dogkahlua

      I have a file which I am trying to count the number of students for a particular fund -- I was able to due that (create the count fields in the file the data lives in and in related files that use the data) several ways however my issue becomes when I try and perform a "find" in any of the fields I created. Any suggestions? Thank you!

        • 1. Re: Count Fields
          coherentkris

          if you have created them as unstored calculations find is going to be problematic as find leverages a field index and unstored calcs cant'/don't have an index

          • 2. Re: Count Fields
            philmodjunk

            I suggest describing what you want in more detail.

             

            I read "create the count fields in the file the data lives in" to mean that you have set up fields of type "summary".

             

            Such aggregate values in summary fields cannot be referenced in a find anyway as they don't hold data specific to any one record and don't hold any value at all while the field is in find mode.

            1 of 1 people found this helpful
            • 3. Re: Count Fields
              dogkahlua

              I will add more detail.  I did create a summary field.

              • 4. Re: Count Fields
                philmodjunk

                If you are creating a summary report with sub summary produced sub totals, it's possible to isolate a specific group or to isolate the top N groups by summary field based sub totals with a bit of creative sorting of the records.

                • 5. Re: Count Fields
                  dogkahlua

                  Here is more information regarding my Count Field issue:

                   

                  I have three files.

                   

                  One file is a student bio file which contains all my students and each has their own unique emplid; which is a number field.

                   

                  One file is a funds file which contains all scholarships available to students and each fund has a unique item type; which is a number field

                   

                  One file is the biofunds file which relates the student to the fund they receive.

                   

                  In created the calculation below in the funds file.  It works however when I put it in my biofunds file -- it will show the correct number, however I can't perform a find.

                   

                  Count(Student File BioFunds::Empl ID)

                   

                  Any suggestions as to why or what I have done wrong.  Should the calculation be in the biofunds file?

                  • 6. Re: Count Fields
                    dogkahlua

                    I did create a summary field however I am not trying to summarize anything -  just get a count, so think that was the wrong way to go.

                     

                    Counts I am trying to get are:

                     

                    # of student for a particular fund

                    # of funds for a particular student

                    • 7. Re: Count Fields
                      philmodjunk

                      Counts are also aggregate values and can be produced from summary fields. But you wouldn't perform a find by specifying search criteria in the summary field itself.

                       

                      It sounds like you need to use part set up to add sub summary layout parts to your layout. WHen you do, select a "when sorted by" field for each that will have the same value for all records in a given group. For example, you can specify the Fund ID or Fund Name field as your when sorted by field. Then you place your "count of" summary field inside this new layout part and sort your records by the specified "sorted by" field.

                       

                      Note that sub summary parts are not visible in browse mode unless their "sorted by" field is currently part of the current sort order. This can confuse new developers when a layout part they created seems to disappear, but it can be a highly useful way to dynamically reconfigure one report just by changing how the records are sorted.

                      • 8. Re: Count Fields
                        dogkahlua

                        Thank you!  Your first paragraph is what I stumbled upon in m y research.  I am working on the layout now.

                        ~Mary~

                        • 9. Re: Count Fields
                          dogkahlua

                          Such aggregate values in summary fields cannot be referenced in a find anyway as they don't hold data specific to any one record and don't hold any value at all while the field is in find mode. <-- This was very helpful and what I found.

                           

                          What I am trying to do is to perform a find on that count field -- how many funds contain only 1 student -- how many funds does a particular student have so when my emails go out my language is correct.  Should I be creating a script or another calculation with that count field to give me these results and send the email?

                          • 10. Re: Count Fields
                            philmodjunk

                            This doesn't sound like something to use summary fields to do.

                             

                            But a relationship that makes it possible to match a fund record to the student records of the students that receive that fund. Then a calculation field in the fund table can use the count function to count records and this will be a field that you can use when performing a find.