Newbies nwxtl Posted December 30, 2005 Newbies Posted December 30, 2005 I haven't been able to figure out the best way to create a database with one container field in a portal with different numbers of photos per record. One record might have 1 related photo, another might have 5 or more. How do I do this? I want just want only one photo to show at a time, and click on an arrow to go to the next photo. I'm using FMP 6, and am probably only at a Novice level of experience. Thanks, Larry
Kent Searight Posted December 30, 2005 Posted December 30, 2005 Just show only 1 portal row. Use the Portal setup dialog to do this. You might want to include a scroll bar?
Newbies nwxtl Posted December 31, 2005 Author Newbies Posted December 31, 2005 Thank you for your reply, but after considering that, I realized that I don't really know the best way to design the files for this, considering relationships, etc. The main file is for a mineralogy database of mineral samples. To make it easy for this discussion, let's say the file has several fields on the mineral name, location, etc. The location field is related to a seperate location file because that information is the same for several sample records. That works fine. What would be the best way to include photo graphs in the main file with one container to show the varied number of photographs? Should the photos be in their own file, each one a separate record with the same ID for each that applies to a specific record in the main file? Or is there some other way to do it. I guess I'm mostly not quite understanding how to store, relate and access 2 photos for one record, 3 for another and 6 for another. Thanks again, Larry
Fenton Posted December 31, 2005 Posted December 31, 2005 The way I've done this is a related file (table) for the pictures. It has an ID of the parent record, and a unique auto-entered ID of its own. Each image has a full size container field, and a smaller one for a thumbnail (128x128 can be automatically created by the Import Folder step; or perhaps you have thumbnails). On the parent record the related thumbnails show in a portal, along the side, with as many rows as the maximum number of pictures. Clicking on a thumbnail (or button in the portal) sets another field (global or regular) to the unique ID of the image record. The parent ID is already known. The full size image is also on the layout, as a single related field, based on a relationship including BOTH the parent ID AND the unique ID of the image. The reason for using both is that otherwise if you flipped to another parent record you'd still see the same picture, which wouldn't be appropriate. If you use a global field for the portal button to set, the large picture will be blank when you flip to a different parent record. If you use a regular field it will show whichever picture you'd last chosen for that parent. In version 7/8 the BOTH part can be done with a compound relationship, using both IDs. In 5/6 you'd need to create a calculation field for a concatenated key of both IDs, in each file. I no longer have example files for 5/6.
Søren Dyhr Posted December 31, 2005 Posted December 31, 2005 Should the photos be in their own file, each one a separate record with the same ID for each that applies to a specific record in the main file? Or is there some other way to do it. I guess I'm mostly not quite understanding how to store, relate and access 2 photos for one record, 3 for another and 6 for another. Might it be sothat you can figure it, if you examine this template? http://www.filemakerpros.com/DBinDB.sit Well it's an oldtimer so you need to upgrade both files to fm6, which is done by dropping both of them ontop of the app icon, and give decent replies to the prompting. --sd
Newbies nwxtl Posted January 2, 2006 Author Newbies Posted January 2, 2006 Thanks for the help to both responses, two good methods. I'm gong to work with Fenton's and see how it works. I like the clean look of the solution Søren's suggested. I am having a problem making it work though. I think I've figured out most of it, but believe I haven't figured out the parameters in the "Next" script. I'm unsure what the parameter is in the "if" statement and the second "Setfield" statement. They look like they are a relationship related to a field: "CreateNewCompany::serial Number". Regards, Larry
Recommended Posts
This topic is 6965 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 accountSign in
Already have an account? Sign in here.
Sign In Now