2 Replies Latest reply on Apr 19, 2017 5:28 PM by user19752

    Server and Find & Replace Script

    MattW_1

      I have an import script I want to run on Filemaker Server but just realized that find/replace isn’t compatible. I’m importing a CSV file and I have a find and replace that finds and replaces the following:

       

      Find “-“

      Replace “**”

       

      Find “20**”

      Replace “”

       

      What’s the best alternative that will work as a server side script?

       

      Thanks!

        • 1. Re: Server and Find & Replace Script
          philmodjunk

          You might consider using auto-enter calculations that does a character substitution as part of the import:

           

          Substitute ( Self ; [ "-" ; "**"] ; ["20**" ; "" ] )

           

          But maybe 20** is using the ** as wild cards? If so, then scratch this suggestion

           

          and if not, note that which substitution you do first could affect your results since the first replace adds ** that might then get cleared by the second replace.

          • 2. Re: Server and Find & Replace Script
            user19752

            "Replace Field Contents" is a choice work on PSOS.

             

            For attention, this can't change value if the imported found set have records locked by other user at the time.

             

            OTOH, auto-enter works through importing, but not only the time, further editting the field also fire it. You can change the behavior using condition something like

            Case ( Get ( some condition flag ) = <<some condition>> ; <<calc>> ; Self )