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.

Maintaining a Portal State

Featured Replies

I've had a search, but am not sure exactly what search terms to use for my problem.I'm sure this will not be the first time it's come up, and the answer may be glaringly obvious.

I have a photo database.

In my layout there is a large central copy of the photo surrounded by relevant details - date, place, notes, people in the photo. There is also a portal which shows related photos in that set.

On the other side there is a portal which shows all photos arranged by date. Scroll up and down to select the photograph you want to see, click on the portal thumbnail and that record is gone to.

My problem is that there are over 800 photographs, and every time you go to a new record the portal resets itself to the first row.

I've tried scripting it to grab the active portal row as a variable and then go to that variable every time a new record is called, and this works reasonably well, but the "AllPhotos" Portal does not need to be active to change records, and when this happens, it scrolls back to the last selected photo in the portal which could have been ten minutes ago after quite some time finding the new photo.

Is there some Get(TopVisiblePortalRow) calculation or something that could sort out this problem?

See:

http://fmforums.com/forum/showtopic.php?tid/194897/

  • Author

Thankyou,

Would you believe I solved it just before reading your post - I got rid of all the scripts I had kept building on and started from scratch.

I have one script that gets the variable when I click the portal row (triggered by a button which is the photo) to go to related record.

And part of my on record load script sorts out the portal.

It doesn't work in iwp, though.

I thought this solution would work as it relies in scripts throughout - the only user interaction is the button click which works in all other ways.

Does anyone have any suggestions?

  • Author

I realised that your solution was far more elegant, and have adapted my database to function using the relationships as in the earlier post.

Not only was scripting cumbersome, but of course as I said earlier, it would not work in iwp.

With the new setup, however, the portal still returns to the first record every time.

Do portals still reset in iwp automatically as they used to in normal filemaker?

I don't know much about IWP. I tried this and I see the same thing - the "portal" resets the scroll upon selection. If a scripted Go to Portal Row works for you, you should try adding this to the button action.

  • Author

Hi Comment,

Thanks for your hep.

The script doesn't work either, but to tell you the truth I'm just happy it works so well now on my own computer, as I'm the one who'll be using it most.

It's only family members who are looking at the site, so they'll be fairly forgiving, I hope.

It's only family members who are looking at the site, so they'll be fairly forgiving, I hope.

Ah, it that what it's about? Perhaps something like this would better suit your purpose:

http://fmforums.com/forum/showpost.php?post/201804/

Note:

The script needs to be adjusted slightly to make it compatible with IWP, but it will work. And with a small effort, you could turn this into a "gallery" type of view.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.