1 Reply Latest reply on Dec 3, 2009 11:33 AM by mrvodka

    tweaking my auto search script

    BatchMaker

      Title

      tweaking my auto search script

      Post

      I'm on FMPA10 on OS X.6

       

      I have two different layouts for a table, the first is a list view (minimal fields), where you search and select record and go to a detail view (all fields). I have a global field (SearchName) in the header with an OnObjectModify script trigger to perform a find. (I'm shooting for the type of automatic search functionality found in OS X or iTunes). The script goes something like this:

       

      Set Error Capture [On]

      Enter Find Mode []

      Set Field [Table1::Name; Table1::SearchName]

      Perform Find []

      Enter Browse Mode []

      Go to Field [Table1::SearchName

      Set Error Capture [Off]

       

      It works just as intended except if you start typing in the middle of your search (to type a "nm" in the middle of "goverent" to make "government") after you type the "n", the go to field puts you at the end so your "m" spells "governentm". 

       

      Is there any way to remember the position in the search field and then return there.

      I wouldn't mind restructuring the way the script works entirely if it would improve the functionality.

       

      Any thoughts would be appreciated.