Newbies jpriv Posted March 17, 2008 Newbies Posted March 17, 2008 Long time FileMaker user, first time trying to create a portal... Need: Show up to four picture or movie clips in one database from a separate media database that has one picture or movie clip in a single container field in each record with it's own ID number. Have: Media database with single picture or movie clip in a container field in each record with a unique media ID number : How do I get the one database to show various pictures from the media database by entering the media ID numbers… I can supply the two database files if needed. Thank you in advance for any help…
Fenton Posted March 17, 2008 Posted March 17, 2008 The fact that each record in the Media database has its own ID is good. But it does not tie the two databases together. You need the ID from the "parent" database record put into a "foreign key" field of the Media record, and a relationship built on those 2 fields (having the same value). So far you haven't told us what the parent database is, nor whether it has a unique ID field of its own; it should. Right now, how do you know what Media file records go with the other database?
Newbies jpriv Posted March 18, 2008 Author Newbies Posted March 18, 2008 Fenton, thank you for the help… The “parent” database is a question database with the questions referring to different pictures/video found in the media database. The question database can have up to 4 pictures or video references per record. For example, in one record of the question database, I will need to show 4 pictures from the media database – I have 4 container fields in the question database (which I’m assuming need to be portals) and in each container/portal field, I would like to show 4 different pictures based on entering the media ID in 4 separate fields in the question database. That’s how I was hoping to create the relationship – when a media ID number is entered in the first of four ID fields in the “parent” question database, it would show that piece of media in the number one spot. When the media ID number is entered in the second ID field in the “parent” question database, the second spot would show that piece of media, and so on for #3 and #4. Does this make sense? Is this possible with the standard version of FileMaker Pro 9??
Fenton Posted March 18, 2008 Posted March 18, 2008 Yes, it is possible. The method you propose is not the usual way we'd do it, though it would work. Your method, of entering the Media ID into the Questions file/table, seems to assume that a picture or video may be assigned to possibly several Questions. Otherwise one would do the opposite, enter the Question ID into the Media file/table. To do it the way you propose you would need 4 Media ID fields in the Question file/table. You'd need 4 relationships, each originating in one of the 4 fields. The way I would do this instead would to create a "join" table between Questions and Media. It would have at least 2 fields, the Question ID and the Media ID. It would have a relationship from Questions, based on the Question ID. This relationship would have [x] Allow creation of related records turned on ([x] Delete related records also). When using a join table there is no need for any Media IDs in Questions. It's a better relational structure. A portal, on the Questions layout, would be based on this relationship. It would have 4 rows (since you want only 4 records). The Media ID field (from the join table) would be in the portal. By entering an ID you would automatically create a join table record with both IDs in it. Another relationship would be from the join table to the Media table, based on Media ID. This relationship would allow you to show the picture/video (well, you could show the picture, the video would just be an icon). You could show the picture/video inside the same portal where you enter the IDs. But probably better would be to create another portal, this one based on a relationship from Questions THRU the join table to Media. You've already got the relational structure for this, might as well use it. The 2 portals would show the same number of records, but the 2nd, with the picture, could be larger if desired.
Recommended Posts
This topic is 6151 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