4 Replies Latest reply on Feb 5, 2015 9:40 PM by CarlSchwarz

    FilterValues Function Improvements


      The Filtervalues function is extremely useful but has a frustrating limitation.


      Currently it only allow you to return all values in List A that exist in List B.


      We need at least, the opposite: All values in Lisit A that are NOT in List B.


      Simple example:


      A list of CustomerID values for a region.

      A list of CustomerID value who meet some criteria.

      For example: were recently sent promotional material.


      Which customers in List A have NOT received this mailing?


      A few people (including me) have addressed this with custom functions but the functions are inefficient as compared to a native feature.

        • 1. Re: FilterValues Function Improvements

          I use UniqueValues(), but a native implementation would be nice.


          I don't think this is the right forum for such requests though. Understandable, since the intention of the forum, to bring up disucssion points for the "Ask a PM
          webinar next week, has been highjacked by feature requests and general complaints.


          Edit: While I do use UniqueValues(), I meant to say AntiFilterValues() which is very useful (thanks Bruce).

          • 2. Re: FilterValues Function Improvements

            Another simple example:


            Recently there was some discussion on another list about script loops and exit conditions.


            Here's an alternative method to process a list.

            For this particular task, other iteration methods may be more efficient; but that is beside the point.

            Here the point here is to illustrate how a not-match filter might be used.


            Set Variable [ $list; List( customersByState::customerID)]

            Set Variable [ $doneList; ""]

            // or perhaps donelist isnot empty but includes items processed by a previous operation


              Set Variable [ $notDoneList; antifiltervalues( $list; $doneList)]

              Exit Loop If [ isEmpty( $notDoneList) ]

              Set Variable[ $thisID; getValue( $notDoneList; 1) ]

              // Do stuff with $thisID then:

              Set Variable [$doneList; List( $doneList; $thisID)]

            End Loop

            • 3. Re: FilterValues Function Improvements

              David, the question should surely therefore be, how many of these excellent suggestions can be actioned and in what timeframe, or how do you prioritise whe faced with a list of great suggestions from people who push the use of the product into the margins of its design.

              • 4. Re: FilterValues Function Improvements

                I just made this suggestion on the Filemaker product suggestions page.  I wish it was done already!!!  I have two similar lists and I want to find the unique values in the two lists and discard the duplicates.