5 Replies Latest reply on Sep 29, 2011 9:02 AM by joelande

    Instant Web Publishing Do NOT Save record changes automatically

    joelande

      Title

      Instant Web Publishing Do NOT Save record changes automatically

      Post

      In FileMaker, I have a layout that I turned of the "save record changes automatically".

      In FileMaker client, this forces a dialog box prompting you to save or discard the changes before proceeding.

       

      Is there a way to duplicate this behavior in Instant Web Publishing?

        • 1. Re: Instant Web Publishing Do NOT Save record changes automatically
          Sorbsbuster

          How did you do that?  Are they not just changes to the layout?

          If you want to save/discard changes to data via IWP I would suggest capturing all the data into global fields and then have a script commit the data.

          • 2. Re: Instant Web Publishing Do NOT Save record changes automatically
            philmodjunk

            Any action that opens a new window or a dialog will not work in IWP. You'd need to switch layouts to display such a message or put it in a text field on your layout instead.

            • 3. Re: Instant Web Publishing Do NOT Save record changes automatically
              joelande

              The normal/default behavior of FileMaker is that all changes to records are saved automatically.

              You normally never have to hit a "save" button.

               

              However, in Layout Setup, there is a check box option:

              Save record changes automatically

              If you uncheck this box, then, in the client, if you modify a record using a layout with automatic saving turned off, the changes are not automatically saved.

              Instead what happens, is as soon as you navigate away — say by running a script, or changing layouts, or even clicking on the layout background — FileMaker will ask you if you want to save the changes you made first.

               

              I assumed/thought/hoped that this behavior would be similar when using Instant Web Publishing, but it is not — changes to a record on that layout are automatically saved. I was surprised by that.

               

              Anyways, I was wondering if I overlooked a setting, or there was some other simple way to enable this behavior (I thought I had done this before, but perhaps I was mistaken).

              • 4. Re: Instant Web Publishing Do NOT Save record changes automatically
                philmodjunk

                You'd have to script a button for this and avoid using a dialog or new window to display the message.

                Buttons that take the user to the next step or a differnt layout, for example, could ask the user if they want to save the changes. If they choose, no, you revert this record. As sorbsbuster suggested, this can be easier to control if you use global fields to capture the edits and then use a series of set field steps in a script to copy the values from the global fields to the actual fields of the correct record in your table.

                • 5. Re: Instant Web Publishing Do NOT Save record changes automatically
                  joelande

                  Any action that opens a new window or a dialog will not work in IWP. You'd need to switch layouts to display such a message or put it in a text field on your layout instead.

                  That's not entirely true. For example, if I require a field value to be entered using validation, the browser throws up a dialog box saying:

                  Required Field Contents:

                  Values must be entered for the following field: "Week."

                   

                  I was hoping a similar dialog would appear that says "Do you want to save the changes?".