3 Replies Latest reply on Jul 22, 2010 8:54 AM by mrvodka

    Would like to disable the clicking outside feilds when entering data

    med

      Summary

      Would like to disable the clicking outside feilds when entering data

      Product

      FileMaker Pro

      Version

      11 advanced

      Operating system version

      windows vista, 7

      Description of the issue

      when entering data filemaker tries to commit the change every time you click on an empty space. This is not safe for some users, and annoying for others. Is there a way to prevent that and create a botton to be clicked at the end to save all the changes to the record at once?

        • 1. Re: Would like to disable the clicking outside feilds when entering data
          philmodjunk

          I keep thinking there's a better way, but the following approach does work:

          1. Define an additional field in your table.
          2. Place this field on your layout, resize and position it to cover the entire layout.
          3. Move it to the back behind all fields.
          4. Make it invisible by specifying no border and transparent color
          5. In the inspector disable field entry when in find mode.
          6. Write a one line script: Go To Next Field
          7. Assign an OnObjectEnter script trigger to this field to run the above script.
          8. Now you can add a button that performs the Commit Record step to save the changes when finished.
          • 2. Re: Would like to disable the clicking outside feilds when entering data
            Steve Wright

            How about doing something along the lines of below (untested) 

            Set a script trigger for OnRecordCommit

            If [Get(ScriptParameter) = "commit"]  // button pressed
                Set Variable [$$commit = 1]  //ensure the trigger will exit true
                Commit Records/Requests[]  // cause the trigger to fire
                Exit Script [Result: True]

            Else If[$$commit=1] // Trigger run from button
                 Set Variable [$$commit; Value ""]  // clear for next instance
                 Exit Script [Result:True]      // allow commit to proceed

            Else  // Trigger run from all other areas
                 Exit Script [Result: False]   // prevent commit

            End If

            The commit button would run the same script in this example


            In theory, If the script parameter was commit (i.e button pressed) it would run the commit step which would trigger the script, this time with the variable set.

            Due to the variable and no script parameter, step 2 would run and clear the variable, exiting the script with a true result, allowing the commit to proceed.

            If the layout was clicked, no script parameter is passed so $$commit would remain empty, only leaving it to exit the script with False preventing the commit. 

            Like I say, Ive not tested it myself (yet) so its all theoretical.

            • 3. Re: Would like to disable the clicking outside feilds when entering data
              mrvodka

              Put an empty web wiewer in the background behind all your fields. You can turn off the lines and all options on the viewer to make it invisible. Now all you need is button to commit the record ( surpress the dialog if you wish ).