1 Reply Latest reply on Mar 2, 2012 9:49 AM by philmodjunk

    Use text entered in find mode to highlight text



      Use text entered in find mode to highlight text




      I am new to FileMaker and have made a database for searching for articles.

      I have a main layout with a search Field that is a calculation made from the 2 Fields I want to search. When you start the database it goes into Find Mode and waits for you to search for something. The results are displayed on the next layout when you press enter.

      You then select the article you wanted and its displayed.


      What I want it to do is highlight in the article what was searched for. I am using this custom function (http://www.briandunning.com/cf/578) but it only works if you search in the quick find box which I am not.


      Is there a way around this?



        • 1. Re: Use text entered in find mode to highlight text

          Do your find this way:

          Define a global field and put it on your layout for the user to enter search text. Now your custom function can be used with the text in this global field to highlite your text.

          Here's a sample script that takes the text from a field with global storage specified and performs a find:

          Go to Layout [//select layout based on your articles table that you want to use to display the articles found]
          Enter Find Mode[]
          Set Field [YourTable::YourCalculationField ; YourTable::GlobalSearchTextField]
          Set Error Capture [on]
          Perform Find []
          If [ Get ( FoundCount ) = 0 // no articles were found ]
              Show Custom Dialog ["No articles matching this text were found..."]
          End If