3 Replies Latest reply on May 31, 2017 6:57 AM by FileKraft

    Filemaker 16 uniqueValues


      Dear Filemaker users,


      I am using the following script step to get all the unique values from a field:


      But it only shows the value from the selected row. How must i adjust the script step so I get all the uniquevalues in a field?


      Kind regards,


      Baran Demir

        • 1. Re: Filemaker 16 uniqueValues

          you need to create a list of values first:


          assuming you are looking for a unique list of ALL values in a table then the easiest calculation would be

          with ExecuteSQL ( "SELECT DISTINCT <<YourUniqueFieldCandidate'sFieldName>> FROM <<YourUniqueFieldCandidate'sTableName>> " ; "" ; "" )


          if you need the found set then you can use a Summary List function ..

          Otherwise create a relationship and accumulate with List etc.

          3 of 3 people found this helpful
          • 2. Re: Filemaker 16 uniqueValues



            Excellent suggestion.


            Since some have reported performance problems with uniqueValues(), I would use the Select DISTINCT that's already built in (if I had version 16, that is) and doesn't require you to do any setup in advance or worry about a particular field type.

            3 of 3 people found this helpful
            • 3. Re: Filemaker 16 uniqueValues

              to be careful with performance it is important that the table which the query is based on has no open records in any window - so the script running the script step with the calculation should run on no opened record (and maybe check if any windows based on the same base table won't have any records open if this particular table has more then a couple of hundred records in it.