2 Replies Latest reply on Mar 7, 2015 6:08 AM by philmodjunk

    Display found record among others

    EdgardRivero

      Title

      Display found record among others

      Post

      Need to display a found record and display it among other similar records.  I can do all the above, but what I'm not able to do is bring the specific record to show center on screen. If records found are smaller than a page, not a problem, but when the records counts are larger, I have to scroll down to see it. I'd like for it to show in the first window.

        • 1. Re: Display found record among others
          SteveMartino

          Are you saying you are performing a find in list view, and you want the found record to land in the center of the screen, if the record count is high enough to put the found record below your viewable area? 

          I don't quite understand your statement of ...need to display a found record and display it among similar records.  If you perform a find, you get a record or a set of records, starting with the first record to as many as you have found.  What then defines a specific record you want to be visible?

          • 2. Re: Display found record among others
            philmodjunk

            Here's a technique that I've used to "center" a record on a list view. It has limitations.

            Find the record and show all records if you want all records fro the table visible. Found record is still the current record. Sort records if needed. Save the value of Get ( RecordNumber ) in a variable. Then go to the first record to scroll the window all the way to "home". Then use go to record to make a record below the found record the current record. You have to know the number of records that can "fit" in your window go to half that number of records past the record number saved in your variable. This should scroll the record to the approximate center of your window. Then use another go to record with your variable to return the focus to the current record.

            You have to check to make sure that the record that is "half past" your found record actually exists by checking Get ( FoundCount ) and if your window can vary in size--say on different monitors in use by different users, you have to check the window size and layout zoom (unless you lock it) in order to calculate that particular record number. And if a user uses the windows display control panel to set their display to a setting other than 100% (which causes display problems in FileMaker 13), they've made a change that you cannot detect from a FileMaker script that will affect how this works.