1 Reply Latest reply on May 22, 2015 7:15 AM by philmodjunk

    How to search in no particular order?

    starstuff

      Title

      How to search in no particular order?

      Post

      Hi All!

       

      i'm studying how to implement a search feature for selecting customers, products, and suppliers and add it to the invoice. in my search, i found Enhanced Value Selection http://www.4shared.com/file/plr_jbkk/EnhancedValueSelection.html by philmodjunk, the search is working if you search to the right, if you search back( to the left) it will not show up. i like the search to be able find all matching text in no particular order

       

      e.g products

      Krispy Kreme Original Glazed Doughnut

      Dunkin Donut Doughut

      Homemade Orig Doughnut

      Dunkin Donut Doughnut Box

      Homemade Orig Doughnut Box

       

      search - starts here

      1. doughnut

      result :

      All will be displayed

       

      2. doughnut box - this is already possible

      result :

      Dunkin Donut Doughnut Box

      Homemade Orig Doughnut Box

       

      3. doughnut box dunkin

      result :

      Dunkin Donut Doughnut Box

      Dunkin Donut Doughnut

       

      4. doughnut donut

      result :

      Dunkin Donut Doughnut Box

      Dunkin Donut Doughnut

       

      5. doughnut home

      result :

      Homemade Orig Doughnut

      Homemade Orig Doughnut Box

       

      6. doughnut kreme

      result:

      Krispy Kreme Original Glazed Doughnut

       

      7. glaze kreme orig

      result:

      Krispy Kreme Original Glazed Doughnut

       

      8. nut em ori

      Krispy Kreme Original Glazed Doughnut

      Homemade Orig Doughnut

      Homemade Orig Doughnut Box

       

      i like the search to be like the example above, you can search anywhere you like,

      say a customer orders a doughnut,  you can type "doug" - it will show all the doughnuts

      but would like to have something original, you don't need to delete doug, instead just type orig = search term "doug orig" - it will show

      Krispy Kreme Original Glazed Doughnut

      Homemade Orig Doughnut

      Homemade Orig Doughnut Box

       

      then the customer wants krispy kreme doughnut = just add kris or krem or kris kre = search term "doug orig kris" or "doug orig krem" or "doug orig kris kre"

      all will show Krispy Kreme Original Glazed Doughnut

       

      would it be possible in filemaker? and how to do it? i like to implement this in all the search, i think its faster to search for something using this.

       

      Thank you all!

        • 1. Re: How to search in no particular order?
          philmodjunk

          It may be faster for the user, but setting it up will be complex and may be slow for large numbers of records. What you describe might actually be easier with a scripted find.

          To make this work from a filtered search portal for any number of search terms would require something along the lines of a recursive custom function (requires FileMaker Advanced to create/install in your solution) or a complex portal filter expression for a limited number of such search terms.

          The limited example:

          Patterncount ( PortalTable::TextField ; LeftWords ( YourTable::GlobalSearchField ; 1 ) ) Or
          Patterncount ( PortalTable::TextField ; MiddleWords ( YourTable::GlobalSearchField ; 2 ; 1 ) ) Or ...