4 Replies Latest reply on Jan 14, 2011 8:13 AM by vct

    Add New Record Issue and Scroll Window to Selection Issue

    vct

      Title

      Add New Record Issue and Scroll Window to Selection Issue

      Post

      I have an application that's develop in v9.  When it's used in V10 or V11,  I noticed a couple of problems. We have Window XP on our computers.

      1st. is where the new record appears.

      In V9, if records are sorted or semi-sorted, the new record appears immediately after the current record, and the sort status changes to Semi-sorted. 

      In V10/V11, it appears that if records are sorted or semi-sorted, the found set will be immediately sorted based on the last used sort order.  However, the screen stay at where the active record was before the new record was added.  This create a problem for me and the user of the application.  In v9, the users see their new record on the  screen.  When they 1st used the application in v10/v11, they thought the record was not added because they didn't see it on the screen.  When they realized that they have to scroll the window up and down to find the newly added record, they're very frustrated. 

      I tried to resolve this New Record appearance issue by added a step to Scroll Window to selection.  This does not work.  the Window simply does not scroll at all.  I added a Refresh Window right before the Scroll Window and after the Scroll Window step, even the Scroll Window was the last step in the script.   Other thing I've tried was added a Commit Record step before the scroll window step.  The Window just simply does not scroll. 

      Have anyone seen this problem and may have a solution?

      Thanks,

      Vivian

       

        • 1. Re: Add New Record Issue and Scroll Window to Selection Issue
          philmodjunk

          This is a "feature" added with FileMaker 10 that many of us have complained about. It has its uses, but it needs to be something we can "turn off" so that it doesn't interfer with situations such as you describe.

          One workaround provided by ULearnIT is to add a do nothing script that pauses. While the script is in the paused state, the auto-sort doesn't kick in and your records stay where they are. This is sometimes implemented with a button labeled "enter edit mode" that starts the script, disables user aborts, then pauses inside an infinite loop such as:

          Allow User Abourt [off]
          Loop
            Pause/Resume
          End Loop

          Then any button on this layout is set to use the Halt option in Button setup... or performs a script that ends in Halt Script in order to terminate this loop.

          If you want to chime in on requesting a change in this feature:  http://www.filemaker.com/company/feature_request.html

          • 2. Re: Add New Record Issue and Scroll Window to Selection Issue
            vct

            Thanks for your reply.  The work-around is not ideal but at least it allows the users to see and "confirm" that the new record has been added.  I will give it a try.

            Also, have you ever run into the problem that the Scroll Window [to Selection] does not work? 

             

            • 3. Re: Add New Record Issue and Scroll Window to Selection Issue
              philmodjunk

              I don't use that script step very often so I'm not a good person to ask that question.

              • 4. Re: Add New Record Issue and Scroll Window to Selection Issue
                vct

                I used the following workaround to solve the Scroll Window to selection problem.  The solution will sort the found set if the FMpro version is 10 or 11.  After the found set is sort, the new record is in the same position as it will be when FMPro automatically sort the found set after the script runs.  I can get the correct Record Number of the new record and use the Go To Record script step to bring the new record to the screen.

                Here are the steps I added to the end of my script.

                Commit Records/Requests [ Skip data entry validation; No dialog ]

                Set Variable [ $Version; Value:Filter ( Get ( ApplicationVersion ) ; "0123456789." ) ]

                Set Variable [ $VersionNumber; Value:Left ( $Version ; ( Position ( $Version ; "." ; 1 ; 1 ) -1 ) ) ]

                Set Variable [ $SortState; Value:Get ( SortState ) ]

                If [ GetAsNumber ( $VersionNumber ) > 9 and GetAsNumber ( $SortState ) > 0 ]

                Sort Records [ ]

                [ No dialog ]

                End If

                Set Variable [ $RecordNumber; Value:Get ( RecordNumber ) ]

                Go to Record/Request/Page [ $RecordNumber ]

                [ No dialog ]