4 Replies Latest reply on May 28, 2013 10:41 AM by mikebeargie

    Decoding a URL encoded text

    billbarman

      How might I decode text that has been encoded as a URL?

      Seems ther should be a GetasURLDecode function.

        • 1. Re: Decoding a URL encoded text
          TonyWhite

          In the mean time, this might help

          http://meyerweb.com/eric/tools/dencoder/

           

          All the best,

           

           

          Tony White

          Tony White Designs, Inc.

          Tel: 646-714-2797 (Google Voice)

          Tel: 718-797-4175

          tony_white@twdesigns.com

          http://www.twdesigns.com

          • 2. Re: Decoding a URL encoded text
            mikebeargie

            Bill,

             

            briandunning.com is a great resource for custom functions. As expected, I found a URLDecode() function already there:

             

            http://www.briandunning.com/cf/528

             

            Best of luck,

            Mike

            • 3. Re: Decoding a URL encoded text
              billbarman

              i found i could use JavaScript like so:

               

              data:text/html, <html> <body> <script>d = ' --ESCAPED TEXT GOES HERE-- '; document.write(unescape(d));</script> </body> </html>

               

              set this as the URL, and display in web viewer.  To get longer escaped strings  include multiple <script> portions, breaking up the text appropriately.

               

              copy the unescaped text from the web viewer and paste into a text field.

               

              lot of work for such a basic function.

              • 4. Re: Decoding a URL encoded text
                mikebeargie

                Actually, that doesn't seem like a lot of work at all, considering it's addressing a very specific need and purpose. Your solution shows that there's usually more than one way to get something done in filemaker, which in my book makes it a very powerful and flexible platform.

                 

                While I see the usefulness of a URLDecode() function (especially coming from a PHP background), It's really only used when interacting with content outside of Filemaker via the webviewer, and possibly Insert From URL. I don't see the need for it as a core function, when there's an easily implemented custom function as well.

                 

                There's hundreds of already written custom functions (1451 at briandunning.com) that augment filemaker's existing core functions, most are compounded versions of other core functions. Selecting or creating custom functions applicable to your specific need will let you powerfully leverage filemaker to your advantage.