5 Replies Latest reply on Feb 12, 2009 2:17 PM by BreitenbushIT

    Script Issue in Instant Web Publishing

    BreitenbushIT

      Title

      Script Issue in Instant Web Publishing

      Post

      I am having a strange issue with a database which I am sharing via "Instant Web Publishing".

       

      I have two layouts in the database.  The first is the standard view of the data with all fields read only.  You can click an "edit" button which takes you to the second layout in which all data can be modified.  There are two buttons on this layout.. one is "Save" which commits the record and goes back to the standard view layout.  The second button is a "Cancel" button which SHOULD revert the record and go back to the standard view.  

       

      It is the second button which isn't working properly (the "Cancel" button).  It takes you back to the standard view layout.. but does not revert the record.  This all works fine while in Filemaker itself.. but doesn't work correctly when accessing the database via Instant Web Publishing.

       

      The button script is as follows:

      Revert Record/Request [No dialog]

      Go to Layout ["Simple View"]

       

      If I take out the "Go to Layout" script step it successfully reverts the record.  

       

      Any help would be appreciated.  Thanks in advance!  :)

       

      -shawn- 

        • 1. Re: Script Issue in Instant Web Publishing
          BreitenbushIT
            

          I am still trying to figure out a solution to this issue.  I have done some additional testing and I still can't figure out what is causing the problem.

           

          If nobody knows what is causing this issue..  does anyone have a suggestion for a different way to accomplish the same thing?  Basically I need a "cancel" button which Reverts the record and then goes back to the main layout.  

           

          Thanks! 

          • 2. Re: Script Issue in Instant Web Publishing
            TSGal

            Breitenbush Office:

             

            Thank you for your post.

             

            I cannot duplicate the problem.  This is what I have done.

             

            1. I created a database file (test.fp7) with one table (test) and one field (Name).

             

            2. I entered one record into Name.  "TSGal"

             

            3. I entered Layout Mode and duplicated the layout (test copy).  I used the oval tool to draw a circle and made it a button that changes to the "test" layout.

             

            4. On the "test" layout, I created two graphics.  One says "Save" and another says "Revert".

             

            5. I created a script, Save, that has the following script steps:

             

            Commit Records/Requests []

            Go to Layout [ "test copy" (test) ]

             

            6. I created a script, Revert, that has the following script steps:

             

            Revert Record/Request []

            Go to Layout [ "test copy" (test) ]

             

            7. I created a button for each of the graphic objects, Save and Revert, and had them performing the scripts "Save" and "Revert" , respectively.

             

            8. I saved all changes to the layout and returned to Browse. 

             

            9. I turned on Instant Web Publishing.

             

            10. I went to another machine, launched a browser, and entered the IP address of the other machine, and the "test.fp7" file displays.

             

            11. After "test.fp7" opens, I switch to the "test copy" layout and click the oval button.  It properly takes me to the "test" layout.

             

            12. I change the value of Name from "TSGal" to "Breitenbush Office" and click the Revert button.  I switch back to the "test copy" layout and the value of Name displays properly as "TSGal".

             

            13. I click the oval button again to return to the "test" layout.

             

            14. I change the value of Name from "TSGal" to "Breitenbush Office" and click the Save button.  I am switched back to the "test copy" layout and value of Name now displays as "Breitenbush Office".

             

            -----

             

            Let me know what I am doing differently from you, and I will try to duplicate it here.

             

            TSGal

            FileMaker, Inc. 

            • 3. Re: Script Issue in Instant Web Publishing
              BreitenbushIT
                

              Hi TSGal,

               

              Thanks so much for trying to replicate my issue.

               

              I see only one difference between what you did and what I have set up.  The button which takes me to my second layout (the edit layout) uses the following script:

               

              Go To Layout ["Edit View"]

              Open Record/Request

               

               

              Your oval button appears to just use the "Go to Layout" step.

               

              I made a new database which is identical to the example you created and have no issues.  I changed the oval button to have the above script and the issue happens the same as in my other database.

               

              I suppose the answer could simply be.. "remove the Open Record step from the script which takes you to the edit screen".  I would prefer to keep that script step if possible since it puts the user directly into editing the record.  Also - I have a portal record which is linked to a few other tables and when I remove the Open Record step I am no longer able to edit the record when I switch to the edit layout.

               

              -shawn- 

              • 4. Re: Script Issue in Instant Web Publishing
                TSGal

                Breitenbush Office:

                 

                Thank you for the clarification.

                 

                Yes, this has been reported.  A Revert commits the data when it follows an Open Record/Request statement when using Instant Web Publishing.  (It works correctly when using FileMaker Pro).  As a workaround, replace the "Open Record/Request" with "Go to Field [ <field name> ]"  This puts you in Edit mode and the Revert will then work.

                 

                TSGal

                FileMaker, Inc. 

                • 5. Re: Script Issue in Instant Web Publishing
                  BreitenbushIT
                    

                  Thanks TSGal!  Your solution solved my issue.

                   

                  -shawn-