kenneth2k1 Posted February 24, 2003 Posted February 24, 2003 Hello FMers! I am creating an inspection photo database for insurance agents. Client data resides in the Clients File and photos reside in the Photos File. Photos is related to Clients and vise versa. Here is the problem: Since a client may have more than one photo, I would like to have one image designated as the Master image. In the Clients File, this would be the image that displays with the client data. I have noticed that the first image record related to a client record will display in the related container. The help file says something about how the first related record will show in a related container, which is based on how related records are sorted. So I made a Master image checkbox and sorted by this field so that it shows as the first related record in a list. But when I go back to the Client File, it has not changed. Then I tried making a calc field that displayed the record designated as Master image, but it would not work to display the proper image in the Clients File. If anyone has a cool way to do this, please let me know. If you need clarification, let me know. Thanks alot Ken
BobWeaver Posted February 24, 2003 Posted February 24, 2003 As far as I'm aware, the sort order has no effect on which related record gets pulled in. It's always the first one created (the first one in the file when it's unsorted). If you want, you can create a second relationship to a second key field in the photo file. Leave this field blank in the photo file for all records except the primary photo for the client. You can make up a script to select and deselect which is the primary picture.
kenneth2k1 Posted February 24, 2003 Author Posted February 24, 2003 Cool. I'll do that. Thanks once again for the help. Ken
jasonwood Posted March 1, 2003 Posted March 1, 2003 Did you do your sort in the "Define Relationships" dialog? The sort within the file itself has no effect on the relationship, but like you said, I thought it would pull the "first related record" which depends on how your *relationship* is sorted.
kenneth2k1 Posted March 18, 2003 Author Posted March 18, 2003 Hi: Sorry this reply's late its been a while since ive been on the forums. I just defined a second relationship as Bob has suggested. I found this to be effective because I wanted the user to have the ability to set a "master" photo, which was accomplished with a few simple set field commands. Thanks guys Ken
BobWeaver Posted March 18, 2003 Posted March 18, 2003 Jason: You could very well be right about setting the sort order in the relationship itself. I hadn't tried it, because of my mindset with older versions of FM (before the relationship sort option was added). Time for me to do some experiments! ....Time passes..... Followup: Well, duh. Jason, you're absolutely right. the related record that is retrieved is the first one in the relationship sort order. Well, this is handy to know.
Recommended Posts
This topic is 7977 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