2 Replies Latest reply on Jul 13, 2012 11:18 PM by BruceRobertson

    LIST Function is being Listless and only shows one entry

    Guy_Smith

      I'm a noob trying to learn some functions and can't get the 'LIST' function to work the way I think it's supposed to: If I understand correctly, the LIST function is supposed to return a CR-delimited list of each unique value found in a field - sort of an index for the field.

       

      I made up a test file with about 30 simple records, each containing 4 fields. I then added a new calculation field with the LIST() function, expecting to get a list (Duh!) of all of the entries in the designated field which contains unique values.

       

      I placed the field in the body of the layout, the header, and the footer and still got the same result: One entry with the value of the designated field of the currently active record. As I scroll through the records, the value in the LIST field changes.

       

      I then created a related TO and put the LIST calc field on the child Layout and got the same result.

       

      I've attached a screen shot to help with my explanation. Any help on this seemingly simple function would be very much appreciated.

       

      Best Regards,

       

      Guy


        • 1. Re: LIST Function is being Listless and only shows one entry
          comment

          List ( FieldInThisTable ) will return data from the same record only.

           

          List ( Related::Field ) will return a list of all non-empty values in related records; if only one value is returned, then only one record is related.

           

          There is no native function to return a list of values in the current found set.

           

           

          Guy_Smith wrote:

           

          If I understand correctly, the LIST function is supposed to return a CR-delimited list of each unique value found in a field - sort of an index for the field.

           

          No, that is not correct. However, you can define a value list based on the field and get a list - unique and sorted - by using the ValiueListItems() function. This will indeeed draw on the index for the field (ignoring any found set).

           

          Message was edited by: Michael Horak

          • 2. Re: LIST Function is being Listless and only shows one entry
            BruceRobertson

            No, that is not at all what the list function does. The list function has nothing to do with uniqueness. It collects ALL vaues across the relationship or list of fields that you provide.

             

            Your screen shot doesn't provide much help. It doesn't show anything about how you are trying use the function.

             

            In general it is more helpful to provide a lot more detail when trying get answers to questions.

             

            Can you post a copy of your file or create a simplified example of what your are trying to do and post that?

            1 of 1 people found this helpful