7 Replies Latest reply on Jul 29, 2010 6:07 AM by carolyn

    Cancelling Edits on IWP without side bar available

    rvargas

      Title

      Cancelling Edits on IWP without side bar available

      Post

      Hi,

       

      Since I'm hiding the side bar in the IWP layout, I don't have access to the Cancel button when wanting to cancel a record edit.  I created my own Cancel button that reverts the record and goes back into Browse mode but for some reason the changes are still saved.  I have turned off "Save record changes automatically" as well but that has made no difference.

       

      Is there a way to cancel a request so that the current record changes are not saved?

       

      Thanks,

       

      - Ron 

        • 1. Re: Cancelling Edits on IWP without side bar available
          TSGal

          rvargas:

           

          What does your "Cancel" script do?

           

          You may want to consider entering the information into global fields.  Then, if you click cancel, you can clear out the global fields.  If you click submit, then a script can add a record and replace the fields with the values from the global fields, and then blank out the global fields.  Does that make sense?

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Cancelling Edits on IWP without side bar available
            rvargas
              

            Thanks TSGal for the quick reply.

             

            My Cancel script is:

            Revert Record/Request [No dialog]

            Enter Browse Mode

            If statement to change layout based on the request type

            Show all records

             

            I'm trying to replicate the Cancel button on the sidebar that is hidden. The above script works in FMP but not in IWP.

             

            The premise is, user clicks the edit button which triggers a script that changes the layout and opens the record for editing. Once there if they want to cancel the edit to disregard their changes, they'll click the cancel button.

             

            Unfortunately, when they click my Cancel button, the revert does not appear to occur and the changes are recorded. I'm hoping that there is something I've missed.

             

            Thanks 

            • 3. Re: Cancelling Edits on IWP without side bar available
              TSGal

              rvargas:

               

              I could not duplicate the problem.  Here is what I did.

               

              I created a script that was solely:

               

              Revert Record/Request [No dialog]

               

              I then created a oval on my layout, and made this a button executing the script above.

               

              In FileMaker Pro, I changed the entire record and clicked the button.  Everything reverted.

               

              I turned on Instant Web Publishing.

               

              I went to another machine, launched Firefox and put in the IP address for Instant Web Publishing.  I select the database file, select the appropriate layout, modified some data, clicked the button and everything reverted.

               

              Let me know what actions are different from yours, and I'll try to duplicate it here.

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Cancelling Edits on IWP without side bar available
                rvargas
                  

                I tried your test and I believe I have found the difference.

                 

                When a user clicks the Edit button I made, they go to an edit layout that was created and the record is Opened to allow instant editing. 

                 

                However, when the record is Opened using the script then the revert does not work and instead the record is closed and saved.

                 

                Once I removed the "Open Record/Request" and I click into a field and trigger Edit mode then the revert works, the changes are not saved.

                 

                I was opening the record so that the user can make edits immediately. Is there a way to trigger Edit mode so that when the user clicks my Edit button they can make changes without having to click in a field first? 

                 

                Thanks for the help.

                • 5. Re: Cancelling Edits on IWP without side bar available
                  TSGal

                  rvargas:

                   

                  I created a button that executes a script that contains:

                   

                  Go to Field [ <first field> ]

                   

                  In my case, I selected the field that is a drop-down list, and when I select a new value and press the revert button, it reverts just fine.  Let me know if this works for you.

                   

                  TSGal

                  FileMaker, Inc. 

                  • 6. Re: Cancelling Edits on IWP without side bar available
                    rvargas
                      

                    TSGal,

                     

                    That did the trick. Removing the Open Record/Request from the Edit Script allows my Cancel button to work properly and selecting a field automatically fixes the need to open the record.

                     

                    Thank you!

                     

                    - Ron 

                    • 7. Re: Cancelling Edits on IWP without side bar available
                      carolyn

                      Hi All,

                      I have a new twist on this issue.  I am working with IWP.  I too am trying to recreate the functionality of the IWP Cancel button in a custom button.  Here is my problem.  I have  a portal.  Within the portal is a field with a drop down list with the options include arrow and auto complete using value list.  The field has a validation that the value must be a member of the value list. 

                      During a testing procedure, I noted it was possible for a user to not select a value in theis field so when the request was sent back to the database the validation error message displayed. I pressed OK.  The problem record was still active however I was not able to do anything to resolve the situation except click the cancel button in the status area.  The problem is that I need to hide the status area for other reasons so I need to create a custom button to the the same thing.  So far I have failed.

                      I have tried:

                      revert record

                      revert record

                      enter browse mode

                      Exit script

                      And possibly some other combinations.

                      Any help would be appreciated.