6 Replies Latest reply on Oct 9, 2015 3:48 PM by mattel

    Portal Scroll Bar Position On Exit



      Portal Scroll Bar Position On Exit


      Is there any way to retain the scroll bar position in a portal when you exit the portal versus the scroll bar defaulting back to the top of the portal?

      This is occurring regardless of whether it is a portal or a regular field with a vertical scroll bar.

        • 1. Re: Portal Scroll Bar Position On Exit

          It depends on what you mean by "exit".

          If your "exit" is a change to another layout--such as a script that changes layouts, manipulates data and then returns--then no, the scroll bar on a portal will reset in every case.

          but if you exit to put the focus elsewhere on the same layout, there's a setting inside portal set up that controls whether or not the scroll bar will reset.

          • 2. Re: Portal Scroll Bar Position On Exit

            Okay. I see that in portal setup and that does alleviate the issue in portals. I had not checked it because of the way it reads. IMHO the dialog should read "DO NOT reset ..."

            Now - HOWEVER, what about a text field that has a scroll bar? For example - a text field that contains extensive notes about the record. Is there any means by which to keep it from resetting? The text field not resetting is the field most important to my needs.

            I have a hunch you're gonna say - Nope, no way.crying

            • 3. Re: Portal Scroll Bar Position On Exit

              Not perfectly. You can use Get ( ActiveSelectionStart ) to capture the current position of the cursor in the field. I think that you can then use set Selection to return that text to view inside the field by returning the cursor to this position.

              • 4. Re: Portal Scroll Bar Position On Exit

                I'm not exactly certain how I would set this up. Is it a script or is it a calculation upon the field that you are trying to suggest? Could you please help me with more detail? This one is a little bit over my head.

                • 5. Re: Portal Scroll Bar Position On Exit

                  I can't guarantee that it would work and it assumes that you have the cursor located in the text field with the scroll bar. A script would have to set a variable to Get ( ActiveSelectionstart ) and then the script that returns you to the layout with this field would have to use the set selection script step to try and scroll that cursor position back into view.

                  • 6. Re: Portal Scroll Bar Position On Exit

                    There was talk of that here - https://community.filemaker.com/thread/61855   - I pretty much need the same functionality, but I'm thinking that a CF written to calculate it might be the only way.  i.e. you are row 60 of 200, and the scroll bar is on position 6 of 12 possible rows.  And you want that recorded, so you can change layouts, and ideally pop that even into a different layout with the same portal on it.