2 Replies Latest reply on Jan 1, 2016 9:00 AM by BeatriceBeaubien

    FileMaker Go: Weird problem with Substitute( ) function:

    chebfarid

      FMPA 13 on OS X and FM Go 12.0.8 on iPad Air.

      In a small HTML parsing routine I'm using the following calculation:

      Substitute ( $html_bookInfo ; "<span dir=ltr>" ; Char ( 13 ) )

      (the $var contains part of the source code of an html page)

      A second function then deletes all the HTML tags.

      This gives in FMPA the expected result, a list of CR separated text pieces which I continue using as a value list in an other script :

      Titolo

      Il grande male

      Volume 637 di Biblioteca Adelphi

      Autore

      Georges Simenon

      tradotto da

      B. Bertoni

      Editore

      Adelphi, 2015

      ISBN

      8845929868, 9788845929861

      Lunghezza

      147 pagine

       

      For completely unknown reason however the substitution of the search-string does not execute on the iPad with FM Go, th result is always a long string without line breaks like this (after the elimination of the html tags)

      TitoloIl grande maleVolume 637 di Biblioteca AdelphiAutoreGeorges Simenontradotto daB. BertoniEditoreAdelphi, 2015ISBN8845929868, 9788845929861Lunghezza147 pagine

      Obviously I have already used also the classic CR-placeholder instead of char(13), the result is always the same.

      I have spent a whole day with this problem but I won't get out of it - I tested various substitutions on the iPad and they all worked fine but FM Go won't work with my source text.

      Here an example of the text saved in $html_bookInfo:

      <td class="metadata_label">Titolo</td><td class="metadata_value">

      Il grande male</span><br><a class="primary" href="https://www.google.it/search?hl=it&tbo=p&tbm=bks&q=bibliogroup:%22Biblioteca+Adelphi%22&source=gbs_metadata_r&cad=3"><i>

      Volume 637 di Biblioteca Adelphi</span></i></a></td></tr><tr class="metadata_row"><td class="metadata_label">

      Autore ...

       

      As you see It's plain simple html code, I really don't understand why the Substitute( ) function of FMGo won't work with it.


      Every hint is highly appreciated,

      Happy New Year from Milano

        • 1. Re: FileMaker Go: Weird problem with Substitute( ) function:
          chebfarid

          I answer to myself

          After adding a layout with some debug fields I finally managed to see what was going wrong: the html source is different when the page is loaded on the iPad ! (In both cases using a web viewer inside my database)

          My search-string "<span dir=ltr>" changes to "<span dir="ltr">" and thus the substitution could never take place ... incredible!

           

          Sorry to bother you with such a stupid issue

          and again HNY !

          • 2. Re: FileMaker Go: Weird problem with Substitute( ) function:
            BeatriceBeaubien

            Hi chebfarid,

             

            Thanks for sharing your observation. Odd but interesting none the less.

             

            HNY,

             

            Beatrice

             

            On Jan 1, 2016, at 10:50, chebfarid <noreply@filemaker.com> wrote

             

                                      

            FileMaker Go: Weird problem with Substitute( ) function:

            reply from chebfarid in Discussions - View the full discussion

             

            I answer to myself

             

            After adding a layout with some debug fields I finally managed to see what was going wrong: the html source is different when the page is loaded on the iPad ! (In both cases using a web viewer inside my database)

             

            My search-string "<span dir=ltr>" changes to "<span dir="ltr">" and thus the substitution could never take place ... incredible!

             

             

            Sorry to bother you with such a stupid issue

             

            and again HNY !