Is the picture in the same table as the names? If so, the same process that you are using to add the name fields from the newly related table occurrence (Instance) will work to show the picture. You can click any field while in layout mode and see the field's table occurrence name as the text to the left of :: in "Display Data From" on the Inspector's data tab.
Hi, Thanks for responding. I have obviously set something up wrong as the picture shown is the same as the main picture rather than a related dog...
I have attached a screen shot of the table set up. This is quicker than a rather wordy explanation. If you get the time to look at it and respond I'd be really grateful.
I don't see how that will work for any of your fields where you want to show data about a different dog.
On which of the above 3 table occurrences is your layout based? (This will be the name shown in Layout Setup | Show Records from.)
I don't see how that will work for any of your fields where you want to show data about a different dog
Thanks for the response PhilModJunk. I thought this might be the case... I know exactly what I'm trying to do but am struggling to understand how Filemaker pro relates the items to one another. I have put together this diagram of what I was trying to achieve in the hope that someone might be kind enough to make suggestions as how to turn it into a reality...
Thanks in advance for any feedback.
Will there always be a maximum of two other dogs (mother and father maybe?) to show?
Or will the number be variable?
If it's just one or two, you can use this data model:
Dogs|Parent1::__pkDogID = Dogs|Progeny::_fkDogParent1ID
Dogs|Parent2::__pkDogID = Dogs|Progeny::_fkDogparent2ID
There is only one table here, but three table occurrences of that one table.
If the number of related dogs records is varible and could be more than two, then you'll need a different data model that uses a join table.
PS. and while I used the term "parent" here, this same set up still works even if the relationship is not geneological.
Thanks PhilModJunk, Unfortunately, there can be any number of related dogs - They might be related or just associated.
Eventually, I'd like to link the customers to the numerous dogs too so I can put in their details and pull them up on every relevant dog. The whole reason I wanted to use a relational database is so I can enter information once and tie it to numerous entries. If I change an address I want it to update everywhere. HTML vs PHP kind of approach.
I would like to end up with something similar to the following:
Dog 1's Record shows all relevant info and related dogs 2, 3, 4, 7 & 9
Dog 2's Record shows all relevant info and related dogs 1, 3, 4, 7 & 9
Dog 3's Record shows all relevant info and related dogs 1, 2, 4, 7 & 9
etc,etc. I hope this makes sense. I don't know if diagrams are helpful and considered 'good etiquette' on forums. If they are acceptable I will work on more as they save a thousand words.
Any response will be greatly appreciated.
Your description of wanting to have one tab panel of your tab control for each such tab won't be very practical then as you will have a fixed number of tab panels but will not have a fixed number of associated dogs. There are alternative methods you might use.
Here's the Join Table alternative:
Dogs::__pkDogID = Join::_fkDogID
Dogs|Associated::__pkDogID = Join::_fkAsstdDogID
Dogs|Associated is a second Tutorial: What are Table Occurrences? of Dogs.
A portal to Join placed on your Dogs layout will list all associated dogs. Fields, including a container field for the picture, could be included from Dogs|Associated in the rows of that portal. (You can reduce the number of portal rows and increase the height of a portal row to get more of a "mini form view" then the default "mini table view" format for a portal.)
For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained
Hi PhilModJunk, Thanks once again for your response but I'm afraid I'm uncertain as to your exact meaning in some of the explanation - namely 'A Portal to Join placed on your Dogs layout...' Does this mean I create a portal on the Dogs layout attached to the Join Table?
It's not behaving the way I was expecting. In an attempt to best understand your teachings and to simplify in general, I have stripped it all down to just the elements listed in your example. When I add a portal to the Dogs table added to the join table I can work on the portal until I switch back to preview and then there is nothing displayed.
Perhaps you might tell me where I've gone wrong?
To PhilModJunk: I'm presuming there needs to be something like a Family No (Unique last name) to tie the dogs together so they know which dogs are related? I had thought about creating a 'Family' table that included the Serial No function to tie the related dogs to each other. I thought I might use that to also tie individual family members to the dogs. I cannot see why the portal fails to show anything - Not even an empty box. I have included a screen shot to illustrate the point. I'm sure it's a very basic newbie mistake.
I read the article you composed for explaining the primary / foreign key and found it very clear. Thanks.
You are correct that the portal would show "Join" in the show related records from drop down in portal setup.
You would not have a common "family value" with this method, but you do have create records in the Join table before the records are linked and you can see any data in your portal.
The simple "beginner level" approach:
Enable "allow creation of records via this relationship for Join in the dogs to join relationship. (double click the relationship line.)
The Format _fk_Dog_Associated... with a drop down list. Set up a use values from field value list of values from Dogs where Field 1 is __pk_Dog_ID and the second field would be the dog's name. (Note this name has to be unique. Sometimes you have to use a text field with an auto-enter calculation that combines info from several fields and that has a "unique values" validation rule specified.)
You can then select a dog in the portal row using this value list. This act both creates a new record in Join and automatically links it to the current record on your Dogs layout.
There are more sophisticated ways to set this up that can be much more user friendly when it comes to finding and selecting dogs to link in, but you'll need to set up this method first to confirm that everything is set up correctly.