Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8803 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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]

Posted

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

Posted

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.

This topic is 8803 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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