6 Replies Latest reply on Mar 10, 2011 10:46 PM by Johan Hedman

    WebViewer problems

    Johan Hedman

      Summary

      WebViewer problems

      Product

      FileMaker Pro

      Version

      11.v2

      Operating system version

      MacOsX 10.6

      Description of the issue

      When copying script step from one FileMaker database to another and goes in to enter calculation for url it want change TO from the old file to the new TO until you close to old database.

      Steps to reproduce the problem

      Close the old database before changing the calculation for url

        • 1. Re: WebViewer problems
          TSGal

          Hedman:

          Thank you for your post.

          What is the script step you are using to generate the calculation for the Web Viewer?  Is the Web Viewer accessing a text field, and the script step updates the field?  I'll need more information in order to test this.

          TSGal
          FileMaker, Inc.

          • 2. Re: WebViewer problems
            Johan Hedman

            There is not script step. The URL-calculation is inside the Web Viewer. 

            File 1. A calculation that uses Case() to give a URL depending on fields in the database.

            File 2. I copy the Web Viewer from File 1 and without have the same fields or TO in File 2. The url calculation is working as it still was in File 1 until I close File 1 then it gives me error message. 

            • 3. Re: WebViewer problems
              TSGal

              Hedman:

              I am still unable to replicate the problem.  Here are the steps I took:

              1. In File1.fp7, I created a text field "Test1".

              2. I added a record and entered "Yes" into Test1.

              3. On my Layout, I created a Web Viewer with the formula:

              If ( File1::Test1 = "Yes" ; "http://www.filemaker.com" ; "" )

              4. In Browse mode, the FileMaker web site appears as expected.

              5. Returning to Layout mode, I copied the Web Viewer to the clipboard.

              6. In File2.fp7, I went to a layout and pasted the Web Viewer.  Since Test1 field doesn't exist, I had to change the formula.

              7. I went into the formula and changed it to:

              If ( IsEmpty (File2::Field5) ; "http://www.filemaker.com" ; "" )

              8. I go into Browse Mode, and when I blank out Field5, the FileMaker web site displays.

              9. I close out File1.fp7, and the web site still displays.

              Let me know what I'm doing differently than you, and I'll again try to replicate the problem.

              TSGal
              FileMaker, Inc.

              • 4. Re: WebViewer problems
                Johan Hedman

                File 1

                Have a field called Va06_Valuta_Förkortning with value of USD. I have a script that sets a variable to a url:

                "http://www.google.com/search?q=1" & "SEK" & "+in+" & Fö_Valuta::Va06_Valuta_Förkortning & "&ie=UTF-8&oe=UTF-8"

                When I enter the layout I use a script trigger to set the url in the variable and use the variable in a Web Viewer window.

                File 2

                The file is a GUI-file and uses a same table as Fö_Valuta but instead the name is Va_Valuta. I copy the script from File 1. Then url wont change the value Fö_Valuta to Va_Valuta until I close File 1. After I close File 1 everything works fine.

                • 5. Re: WebViewer problems
                  TSGal

                  Hedman:

                  I'm assuming the layout in File 2 (Va_Valuta) also has a script trigger to set the URL when entering the layout

                  In any case, I created the same calculation and fields in my File1.fp7.  My variable is named $$var.  The OnLayoutEnter script trigger calls the script "Set Variable", where your formula above is put into $$var.  The Web Viewer display properly when I enter the Layout.  I then switched to my File2.fp7, imported the script "Set Variable", and changed the formula to reference File2:: instead of File1::.  I set the Layout for OnLayoutEnter to run "Set Variable".  I placed a Web Viewer on the layout and set it to $$var.  It works exactly the same way, and File1 is still open.

                  Let me know what else to try.

                  TSGal
                  FileMaker, Inc.

                  • 6. Re: WebViewer problems
                    Johan Hedman

                    Only difference I did was to copy the script over to File 2. I´m 100% sure it didn´t work until I closed File 1, because I tried it two times. Maybe I had something wrong with my local version of FMPA11v2 at the time, but I dont think so