1 Reply Latest reply on Nov 20, 2013 11:09 AM by Stephen Huston

    Script to Scroll List View Item to Top of Screen


      In the attached .fp7, I need to assign a script to Button such that, when it is clicked, the screen srolls so that the row in which it appears is the first row on the screen.





        • 1. Re: Script to Scroll List View Item to Top of Screen
          Stephen Huston

          I have attached a file which solves much of what you requested with a script with these basic steps:


               Set Variable [ $number ; Get(currentRecordNumber) ]

               Go to Record [ Last ]

               Go to Record [ by calculation: $number ]


          However, as you near the bottom of the list, there will come a point where there are not enough records below the target record to fill the screen in list view, and then the records will fail to scroll further up.


          That could be solved by omitting the records above the selected record,


               Set Variable [ $number ; Get(CurrentRecordNumber - 1 ]

               Go to Record [ First ]

               Omit Multiple Records [ $number ]


          but you would then need to deal with the fact that the list would no longer be scrollable upward.


          Stephen Huston

          see attached file