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.

Portal rows and Images

Featured Replies

  • Newbies

I've created relational image database with a portal in my main.fp5 database displaying multiple photographs (different views of objects) from a related file called Images.fp5.

My problem is that I have created layout in Main database that displays medium sized images in the scrollable portal and I want to be able to click on any image( in the portal) to take me to a new layout that shows me the same image fullscreen size.

I can get the script to take me to another layout displaying the fullscreen sized portal, but it always defaults to the first image in the sequence. Any ideas?

Thanks

David Adam

[email protected]

quote:

Originally posted by David Adam:

I've created relational image database with a portal in my main.fp5 database displaying multiple photographs (different views of objects) from a related file called Images.fp5.

My problem is that I have created layout in Main database that displays medium sized images in the scrollable portal and I want to be able to click on any image( in the portal) to take me to a new layout that shows me the same image fullscreen size.

I can get the script to take me to another layout displaying the fullscreen sized portal, but it always defaults to the first image in the sequence. Any ideas?

Thanks

David Adam


This is a guess, but I think I might have an idea as to what the problem is.

If you have a relationship called Images where there are many records in the Images file that can be related to the current file, and you place a related field on a layout but NOT in a portal, you will always get the first record in the sort order of the relationship. If no sort order for the relationship is specified, then it will be the first related record that was created.

There are two easy ways to fix the problem. The first is to have a container field in the local file. For this purpose, I would go ahead and make it a global container field. Let's call it gImage.

Place the gImage field on the layout instead of the related field.

To get the image you want into gImage, you would do the following in a script:

Set Field [ gImage, Images::Picture ]

Go to Layout [ Large Photo ]

This copies the picture in the portal row into you global container field and takes you to the layout to view it.

The second way to do this is to have a second relationship. Let's say that the relationship is based on a text field in both files called ID. Create a global text field called gID and create a relationship just like the one you have except that the match field in the current file will be gID instead of ID. Then replace the related field on your detail layout with the field from the new relationship. To get this to work, the script would have the following Set Field:

Set Field [ gID, Images::ID ]

Go to Layout [ Large Photo ]

Chuck

Or you could set the field to be a button that goes to the related record and then jumps to the full-size layout in the related file.

Wunnerful thing about FMP is its flexibility.

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.