8 Replies Latest reply on Aug 6, 2012 2:56 PM by philmodjunk

    MAINTAIN SEMI-SORTED while editing.

    AnswerFeedback_8

      Title

      MAINTAIN SEMI-SORTED while editing.

      Post

      Since FM10 editing a sorted field in a list of sorted records gives us an instant head-ache when leaving the record, as the record is flashed away to a far-out place as it is put in-line among its (thousands) colleagues.

      IS THERE A WAY TO STOP THIS, or, in other words: IS THERE A WAY OR SCRIPTING COMMAND THAT CAN FM STOP DOIING SO ?

        • 1. Re: MAINTAIN SEMI-SORTED while editing.
          philmodjunk

          In FileMaker 12, they added a checkbox to the sort records dialog: "Keep records in sorted order". Clear this check box and we are once again able to keep records from jumping around when we edit a field in the current sort order.

          In fileMaker 10 and 11, you can achieve the same result if you pause a script before you start editing the records and keep paused until you finish. This is far from perfect, but does keep the records from changing position.

          • 2. Re: MAINTAIN SEMI-SORTED while editing.
            AnswerFeedback_8

            P.S. I put in some pause buttons, but wonder how, with a user button, or as part of a script under another button I can cancel the Pause; so avoiding the necessity of using the FM continue button.  The cancelresume scriptstep isn't the answer....

            • 3. Re: MAINTAIN SEMI-SORTED while editing.
              philmodjunk

              Halt Script will eliminate the pause. You can use this as a script step--you can put it as the last step of a script performed by clicking a button, a button setup option, or if you have a button that performs a script, you can select Halt Script in the Current Script drop down. (Ever wonder how you might use that drop down?)

              • 4. Re: MAINTAIN SEMI-SORTED while editing.
                AnswerFeedback_8

                Dear Phil, I tried this allready, but it doesn't work!

                e.g. a Halt Script button with only script step 'halt script' creates a new script level; stops that script, and the initial Pause is still active.

                I hope to find a good solution; would accept a script under a 'go-on' button. 

                • 5. Re: MAINTAIN SEMI-SORTED while editing.
                  philmodjunk

                  I use this method all the time. Make sure that you are using Halt script and not Exit Script.

                  Halt script Halts all executing or paused scripts in your file.

                  • 6. Re: MAINTAIN SEMI-SORTED while editing.
                    AnswerFeedback_8

                    Dear Phil,

                     

                    You made my day!

                    I am using a Dutch version; assumed the Halt to be in dutch the "afsluiten=close" (scriptstep 3).

                    I now tried the dutch "onderbreken=interrupt"(scriptstep 4) and YES it worked!!

                    I can now put it in a few button/scripts that exit this layout

                    Thanks for your tenacity to get me right.

                    • 7. Re: MAINTAIN SEMI-SORTED while editing.

                      When editing a record, I usually open a new window for editing. This lets me show a layout with no editable fields to the viewer to prevent casual editing catastrophes. It's amazing how many accidental field modifications can occur and how nicely filemaker saves them without warning when you change layouts or close a window.

                      The non-editable layout is simply a duplicate of the editable layout with a select all and unchecking the button in the Inspector that allows editing of the field. It's amazing how easy this is compared to other methods.

                      Using a button on a form layout to open the window and move to the editing layout or on a list body to go to the same layout works nicely.

                      Then the layout has a close and save button on it and the script for that closes the window. I suppose a close window button will also save the record.

                      To make it easy to work with I name a layout something like this:

                      [FORM] Address Edit
                      [FORM] Address No-Edit

                      Then my script

                      If (get(scriptparameter) = "Edit"

                      Go to layout....Edit

                      else

                      Go to layout...No-Edit 

                      end if

                      So, when I set my button to the script I simply add the parameter Edit or No-Edit and if I forget, I get the No-Edit.

                      • 8. Re: MAINTAIN SEMI-SORTED while editing.
                        philmodjunk

                        It's amazing how many accidental field modifications can occur and how nicely filemaker saves them without warning when you change layouts or close a window.

                        Yes, but that will still be the case with your two layouts--one for editing and one that does not allow editing. The only excepting being that the edit window can display data for a single record (be in form view) and thus editing a field used in the sort order won't make the record visibly "jump" to a new location.

                        The non-editable layout is simply a duplicate of the editable layout with a select all and unchecking the button in the Inspector that allows editing of the field. It's amazing how easy this is compared to other methods.

                        The downside being that you now have two layouts to maintain instead of one.

                        It's definitely an alternative to consider, but may not be practical for all layouts and workflows. If the user needs to do a lot of editing from a list or table view, the need to keep clicking buttons to open a new window or change layouts will really slow them down. If the only difference between the two layouts is the that one permits editing, it doesn't meet the needs of our OP as the main issue was to keep the "auto-sort" feature we are "blessed" with in FMP 10 and 11 from interfering with the user's ability to quickly and accurately edit date while in a list or table view.