Making the portal scroll to a particular record

Title

Making the portal scroll to a particular record

Post

I have a solution that has different layouts with a portal on each one, where each portal is sorted by Agent Name. In each portal, there are a couple buttons in each portal row, where each button allows the user to move to a different layout for that particular Agent. However, the layout they land on will also have a portal of Agents. What I need is for the user to not see the the portal in the next layout reset the scroll bar. I want to be able to have the button script load the next layout with the chosen Agent appearing at the top of the portal, or at least be clearly present in the view without further scrolling.

I guess I need the script to find the portal row that houses the given Agent in the layout that's called, and then go to that portal row. I don't see how a script can find what portal row a given record is on. That might help.

Thanks for the reply, Kido. The problem is that when the user presses a button on the selected Agent in the portal, they are taken to a different layout where another portal lives, allowing them to choose a different Agent in that portal if they want. So I don't want to use a GTRR in this case. While they are in the second layout, they see the record of the Agent they chose in the first layout (via a global field), and can edit it, etc.

But when the second layout is loaded, the portal scrolls to the top of the list, many times leaving the Agent's record in a lower portal row that can't be seen without scrolling again.

If the portal in your second layout displays same data as the one in first layout, then the portal row number will be the same regardless the number of visible rows in each portal.

You can capture the row number into a variable and use in the button script using Go to Portal Row. This will highlight the selected agent in the portal. You can work around to position the agent highlighted in the top portal line (portal row + [nr of lines in portal - 1]; portal row).