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.

how to safely return to one's place in a portal when returning from a new layout

Featured Replies

I am a self-taught FM user. I have developed my first database, with lots of scripting, and am about to start sharing it. In my scripts, I often have to switch temporarily to an unrelated table on the relationship graph. So I switch to a new layout, perform an operation, and then return to my original layout. To ensure that I get back to where I was, I make sure first to save the record number and portal number. I go back to the same record number and portal number when I return to the layout I had started from (not necessarily using Return to Original Layout, because I might not have started from the layout active at the very start of the script).

Working alone, I have run into no problems. It hits me now, however, that if another user, say, deletes a different record in the table that I had started from, my saving the original record number will probably not take me back to where I was, because there will be fewer records in the table ahead of the record I want to return to. Am I right that I have not coded things properly and am bound to run into problems as other users start to use the database?

Was it unnecessary to save the record number and portal number in the first place? I.e., were I to go back to Layout 1 after going to Layout 2, will I automatically end up at the same record number and the same portal number?

If the answer to the last question is no, then is starting a new window from Layout 1 and Window 1 rather than going to a new layout on the same window the solution? Then, presumably, when I close Window 2 and go back to Window 1, I will automatically be back at the correct record and portal row in Layout 1.

Any guidance on this issue will be greatly appreciated, since I may need to modify all of my past code and want to be sure that I get this right.

There should be no reason to remember the record number: just leaving the layout won't change the record (unless the process explicitly does something that does).

However returning to the portal isn't necessarily smooth because although you can return to the portal row, the selected row will always be at the bottom of the portal. This may be different to the original portal state: the portal may have been scrolled and the row was near the top, say.

I have no solution to it except to the problem other than to do all the work in a new window.

Other people may have more options.

  • Author

Many thanks. That's very helpful.

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.