10 Replies Latest reply on Oct 5, 2016 10:37 PM by schamblee

    FMEasySignature works on MAC but does not on Windows

    schamblee

      Title

      FMEasySignature works on MAC but does not on Windows

      Post

      Has anyone used FMEasySignature?  Works great on MAC, but no go on Windows.   
      www.FMEasySignature.com

      I though this would be a great way to add a Signature box to a Windows Tablet, but for some reason fmpurl does not work correct on Windows, so under Windows the Signature is not saved to a container.  Works fine on MAC.   Just wondering if I missed something.  

       

       

       

        • 1. Re: FMEasySignature works on MAC but does not on Windows
          philmcgeehan

          I am also trying to get this to work for a Windows tablet.

          I have done a little research and discovered that Internet Explorer (which is used by FMP on Windows) limits the length of URLs to 2,083 characters.

          The base64 encoded signature that the Web Viewer is trying to send back in to FMP is around 18,000+ characters.

          Safari allows URLs up to 80,000 characters.

          This is why it works on Mac but not Windows – which is a pain to say the least.

          I changed the following part of the Javascript code in the WebViewer URL

                                                                                                                                 
          From This¶                    // Prep the URL to use for the hand-off to FM.
                         ¶                    var fullURL = '" & fmpurl & "&param=' + var_encoded;
          To This¶                    // Prep the URL to use for the hand-off to FM.
                         ¶                    var fullURL = '" & fmpurl & "&param=' +'hello';

           

           

           

           

           

          ... in order to test my hypothesis, which turned out to be correct. It ran the script and displayed some ??? in my container field. Whereas before it wouldn't even run the script.

          But unfortunately, I haven't come up with a solution.

          • 2. Re: FMEasySignature works on MAC but does not on Windows
            philmcgeehan

            I've found a workaround!

            It does use the clipboard though, but I've found no other way.

            After the Encode The Data part of the JavaScript code, paste the following:

                                                             
            ¶                    // Send the data to the Clipboard.
                           ¶                    window.clipboardData.setData( 'Text' , var_encoded );
                           ¶
                           ¶                    // Prep the URL to use for the hand-off to FM.
                           ¶                    var fullURL = '" & fmpurl & "&param=clipboard';

             

             

             

             

            This will send the Base64 encoded text to the windows clipboard.

            Then fire off the 'save signature' script using the parameter "clipboard"

            In the FMP script you can add an if script parameter = clipboard step then paste the clipboard contents to another field. I created another text field called SigBase64. You can then set the Signature container to the Decoded contents of the SigBase64 field; I needed to add a few more Substitutions to the pasted data, before i could decode it:

                                                             
            Substitute (
                                   TABLE::SigBase64 ; [ "data:image/png;base64," ; "" ] ;
                                   [ "%2B" ; "+" ] ; 
                                   [ "%2C" ; "," ] ; 
                                   [ "%2F" ; "/" ] ; 
                                   [ "%3A" ; ":" ] ; 
                                   [ "%3B" ; ";" ] ; 
                                   [ "%3D" ; "=" ]
                           )

            The new SigBase64 field needs to be on the layout you are pasting it into; but I hid mine, because I don't want the end users to see it.

            Hope this helps people!

            • 3. Re: FMEasySignature works on MAC but does not on Windows
              schamblee

              I had found the information about the limits on Internet Explorer, and I assumed that may be the issue.  I will give it a test today. Thanks.

              • 4. Re: FMEasySignature works on MAC but does not on Windows
                schamblee

                I got this working with Phil_1986 information he provided above.  I made some other small changes to make it easier to distribute this modified version. Users that are interest in this file, please download the original from http://www.fmeasysignature.com/ which has the login information plus license agreement.  

                The modified file can be download here :

                 https://www.dropbox.com/s/p79mjv6g1rnypwn/FMEasySignature-Mac%26Windows.fmp12?dl=0

                This new file will work on mac & windows.  

                Thanks again Phil_1986

                • 5. Re: FMEasySignature works on MAC but does not on Windows
                  WalterFiore

                  Hi,

                  I use this solution on transformer book Asus with Win8 and works correctly.

                  After that I install this solution on another same model fo transformer book with identically configuration. But It doesn't work.

                  Is possible draw the signature and cancel button works, but the save button doesn't "export" signature in to Container field.

                  When I save, the clipboard is populate with var_encoded.

                  There is a particular setting of the browser to check?

                  • 6. Re: FMEasySignature works on MAC but does not on Windows
                    schamblee

                    The solution uses fmpurl.   I have seen issue if you have more than one copy of FM installed on the system (13 & 14) and you are running the database from the older version 13.   I've tried to set 13 as the default program to open the database but it still does not seem to work. So if you have more than one version of FM you will need to use the newest version or uninstall the newest version.

                     

                    fmpurl is used in the custom function, I understand that the database filename is case sensitive.   This is the step that sends control back to FM so this is where I would start my trouble shooting.  

                    • 7. Re: FMEasySignature works on MAC but does not on Windows
                      HammerOz

                      Guys,

                       

                      Is this solution holding up well on windows 10 or are you using another method now? Thanks for sharing the file!

                      • 8. Re: FMEasySignature works on MAC but does not on Windows
                        schamblee

                        There are other solution available, but this one still works.

                         

                        Dropbox - FMEasySignature-Mac&Windows.fmp12

                        • 9. Re: FMEasySignature works on MAC but does not on Windows
                          gmotta

                          I'm not being able to access the file....any other way you could post it? Thanks for the help.