Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Display active portal row

Featured Replies

I have a portal with more values than fit on the screen. I scroll to a value and select it. If I leave the layout and return, the portal does not automatically return to the active row. I would like the portal to scroll and make the active row visible when I return to the layout. I've tried using Get(ActivePortalRowNumber) but can't get it to work. Is there a way to do this?

When you scroll to the row to select it you could grab the row number in a global variable.  Then when you come back you could go to that variable [row].  However, if changes the found set upon re-entering the layout, you would not go back to the same portal row.

12 hours ago, john9210 said:

If I leave the layout and return, the portal does not automatically return to the active row.

A simple solution is to open a new window and go to the other layout there. When you're done, close the new window to return to the original layout with the original active row and scroll position intact.

  • Author

Didn't work for me. I went to a new window by scrip. When done, I closed the window and returned, but the scroll position was not intact. The selected row was not visible. I had to scroll to it.

4 hours ago, john9210 said:

I closed the window and returned, but the scroll position was not intact. The selected row was not visible.

That's not my experience. What else does your script do besides going to another layout?

  • Author

Here's what finally works for me. The following script returns to the Data input layout where the portal is, and makes the row visible. The portal object name is "Portal". gSelectedRow is the row that is highlighted before leaving and returning to the layout.
Enter Browse Mode
Go to Layout [ “Data input-Item” (ITEMS) ]
Go to Object [ Object Name: "Portal" ]
Go to Field [ Selection portal::pkItemID ]
Go to Portal Row [ Select; First ]
Loop
Exit Loop If [ Selection portal::pkItemID=Globals::gSelectedRow ]
Go to Field [ Selection portal::pkItemID ]
Go to Portal Row [ Select; Next; Exit after last ]
End Loop
I don't know why, but the Go to Field script steps are needed. Without them, the desired row is not visible, and I have to manually scroll to it. This leaves the curser in the field at the end of the script. I tried adding a step to go to another object on the layout to avoid this, but with the extra step the row does not become visible. I really can't find any useful explanation for using the Go to Portal Row script step. Although the script goes to the correct row, it does not run the script trigger attached to the field in the row. So, going to a row is not equivalent to clicking on the row. Is there a way to "click" on a row via script?

 

Delete that script. You don't seem to have actually followed the suggestion. See attached.

Edit portal row record.png

portal row edit.fmp12.zip

  • Author

Thanks for the demo file. But I'm not sure how to apply it to my situation. Are you implying that I have to use GTRR to and then return to the starting layout? What if I want to go to a layout with a different source table and then return?

As recommended by Comment: in the original window, do not ever leave the original layout.

Open a NEW window. Do what you want there. CLOSE the new window when done.

Get to this new window however you want.

You said you did this. It is obvious from your reply that you did NOT.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.