AnsweredAssumed Answered

Centering A Record In A List View

Question asked by iking42 on Jan 18, 2014
Latest reply on Aug 28, 2016 by fabino


Centering A Record In A List View


     Given a specific RecordNumber, I wish to write a script that will always center any selected RecordNumber in a list view of very many records. I have a index layout with buttons on the titles. When selected, the buttons open a Form view of the title related contents. All works great. 

     On returning from the Form view to the List view, I need to center the particular selected RecordNumber in the displayed list of records. Not default to top or bottom. "Go to Record/Request/Page" selects the record but will not scroll the page.

     My return script, finds all, sorts and preps window size, then ends with a "Go to Record/Request/Page" calculation using the selected RecordNumber as the calculation.

     Performance is unstable, sometimes it works but leaves the selected record at the last record in the displayed list. Sometimes it goes to the top of page and selection is off screen all together?

     Tried "Scroll Window". This function appears to be useless. Does not work for any of the caned "Home/End/PageUp/PageDown/To Selection" values. How do I specify a "To Selection" value.  "Set Selection" does not appear to be a valid approach.

     Tried adding 15 to value of last record visited, workes sometimes but leaves the wrong record selected. Adding a second line to go to the correct record moves the display back to the bottom again

     I am at a loss hear and would appreciate any suggestions anyone may have