1 Reply Latest reply on Oct 29, 2009 9:18 AM by TSGal

    Find and Replace Alternative



      Find and Replace Alternative


      Since "Find and Replace" is not web compatible, I was wondering if there is a way to create a calculation field to replace this option. More specifically, I have a global search fxn and it would be helpful if in that list of results I had a field that indicated in which field on each of the matching records the search word was found. Any thoughts? Thanks!

        • 1. Re: Find and Replace Alternative



          Thank you for your post.


          You may want to look at PatternCount function.  This returns the number of times a text string is found inside another text string or field.  For example, if you have a Text field, QUOTE, with the following information:


          Four score and seven years ago


          PatternCount ( QUOTE ; "year" ) returns 1

          PatternCount ( QUOTE ; "e" ) returns 4

          PatternCount ( QUOTE ; "z" ) returns 0


          Likewise, if the global field g_Search contains "year":


          PatternCount (QUOTE ; g_Search ) returns 1


          Therefore, you can use this function to go through the fields and records. When the value is greater than 0 (zero), you can mark the record/field or put it into another table.  This should give you a good starting point.


          Let me know if you need clarification for any of the above steps.



          FileMaker, Inc.