7 Replies Latest reply on Nov 9, 2016 2:00 AM by oumayma

    button Edit

    oumayma

      I want to ask

      For example, the user entered the edit button and deleted some of the fields and press the cancel button

      In this case you have to return the scanned fields

      I found a solution but a long

      edit.PNG

      empty.PNG

      because i have 37 fields 

        • 1. Re: button Edit
          philmodjunk

          I cannot understand your description of your problem. Please describe it in much more detail.

           

          Do you mean by "delete field" a user is deleting the information inside the field? A user would not normally be allowed to delete the actual field from your database.

           

          Do you want users to select fields to be cleared of the data that they store with an option to click cancel to keep from making that change?

          • 2. Re: button Edit
            oumayma

            when users click the back button the changes are not save

            • 3. Re: button Edit
              philmodjunk

              Why would they be saved?

               

              Why does your back button's script do the same thing over and over again?

               

              What your script does is check to see if the duration field is empty and if so, it sets it to the value of the variable. Since the variable gets its value when the user clicks the edit button, this means that the value of the field is reverted back to the original value, but only if the field is empty.

               

              And modifications to any other field are ignored by the script you've posted here...

              • 4. Re: button Edit
                danielfarnan

                It sounds like you want a layout that will allow the user to enter data, but if they click a Cancel button all changes are discarded. The trick is to have script triggers set on the layout to disable the automatic commit unless the user expressly clicks to save the changes. There's an article at http://www.soliantconsulting.com/blog/2012/08/easy-filemaker-modal-edit-dialogs-full-rollback-support that should give you some pointers.

                1 of 1 people found this helpful
                • 5. Re: button Edit
                  philmodjunk

                  Another option is to set up a group of global fields for editing the data. When you click a button to start editing, the script copies the data to the global fields. To "save", a script copies the values back. To cancel, you just leave the values in the global fields without copying anything back.

                  • 6. Re: button Edit
                    oumayma

                    thank youuuuuuuuuu very much for your answer philmodjunk

                    I used the script : Revert Record/Request [ No dialog ]

                    • 7. Re: button Edit
                      oumayma

                      thank youuuuuuuuuu very much for your answer danielfarnan

                        I used the script : Revert Record/Request [ No dialog ]