4 Replies Latest reply on Feb 9, 2009 3:16 PM by Vettura

    iTunes-like search facility



      iTunes-like search facility


      Hi All,

      I'm sure this has been asked many times before but searching the forum I have only found answers that touch the surface of what I'm looking for.


      What I'm trying to create is a dynamic search, similar to an iTunes search.


      I have 3 fields; an airport name, an IATA 3-letter code and an ICAO 4-letter code. I can filter on any of these fields individually, from a list of around 9,500 airports.


      I also have a calculation field which cacatenates these 3 fields into a text string, this field is then used as the value list in an airport lookup field.


      When you type into this lookup field the value list works fine, narrowing down the list offered as you type. However, the moment you pause, the filtering process stops and you have to type from the beginning again,


      e.g. searching for Luton airport, I type LU, you get the value list narrowing down the choices nicely, but pause and then type T changes the list back to choices beginning with T while the LU string previously entered disappears.


      Is there a way of containing the search so as you type each letter in the search field, with or without pausing, the filtering continues where you left off as you continue to type...like in iTunes?


      Hope I explained that clearly enough.





        • 1. Re: iTunes-like search facility
          Thank you for your post.
          At this time, the value list timing cannot be changed.  Once you pause for a second, the type "search" begins again.
          Another option would be to create a text field with a script trigger that displays records in a portal.  You would not be forced into a time limit.  Once the desired record is found, you can click on a button that would take you to the related record.  
          If this option interests you, let me know, and I'll create this for you.
          FileMaker, Inc. 


          The value list timing cannot be changed.  Once you pause for a second, the search type begins again. 
          • 2. Re: iTunes-like search facility

            Hi TSGal,

            As a script trigger is this limited to FileMaker 10 only or would it also work in 9 as well


            I'd really appreciate you creating it for me as I haven't played with the new script triggers in 10 yet.


            Many thanks,



            • 3. Re: iTunes-like search facility



              Script triggers are only available through FileMaker Pro 10.


              Here is a sample script which you can use for yourself.  I have a LOOKUP table that includes the full name.  Here are the fields:


              LongText (Text)

              LengthText (Number)

              ShortText (Calculation - Text) = Left ( LongText ; LengthText )


              I have entered the following information into LongText.  Each line is another record.














              I then created another table, LIST, with the following field:


              Text (Text)




              I created a Relationship between LIST and LOOKUP where LIST::Text = LOOKUP::ShortText


              I created a script, Lookup List, with the following script steps:


              Set Variable [ $var ; Value: LIST::Text ]

              Set Variable [ $varlength ; Value: Length (LIST::Text) ]


              Go to Layout [ "LOOKUP" (LOOKUP) ]


              If [ $varlength > 0 ]

                 Set Error Capture [On]

                 Enter Find Mode []

                 Set Field [ LOOKUP::LongText ; $var ]

                 Perform Find []

                 If [ Get ( FoundCount ) = 0 ]

                    Enter Browse Mode []

                    Show All Records

                    Set Variable [ $varlength ; 0 ]

                 End If

                 Set Error Capture [Off]

              End If


              Replace Field Contents [ No dialog ; LOOKUP::LengthText ; $varlength ]


              Go to Layout [ "LIST" (List) ]

              Go to Field [ LIST ; Text ]




              Go into Layout Mode, click on the field "Text", pull down the Format menu and select "Set Script Triggers..."


              Put a check mark in OnObjectModify, and select the script "Lookup List".


              Create a portal into LOOKUP and include the field LongText.  (You can also include LengthText and ShortText to see what else occurs)


              Now, go into Browse Mode, add a record and type "T".  You should immediately see all records.  Type "H", and you will see Thomas, Thom and Thad.  Press backspace back to "T" and all "T" records display.  Backspace one more time, and nothing appears.


              If you need explanation for any of the steps, please let me know.



              FileMaker, Inc. 



              • 4. Re: iTunes-like search facility

                That is perfect, just what I was looking for.


                Going to have to upgrade everyone to FileMaker 10 now :-)


                Many thanks,