wenzelj Posted September 25, 2004 Posted September 25, 2004 not quite sure about this one..... I am trying to have data in one file(File : (that will change occasionally, yet be necessary for each record in another file(File A)). I am not sure whether I should utilize a relationship or a portal as this is not something I have used before. Here is what I am trying to do: I need a school name, address, and policy # in file B(child) to be used in File A(Parent). There are similar fields in each file. any thoughts....
Lee Smith Posted September 25, 2004 Posted September 25, 2004 If I'm understanding you correctly, and I'm not sure that I am. In File A, create a relationship to File B. Then create a portal in A and use the relationship to view the fields that you want to view. Be sure the fields used meet the requirements of a relationship. For more information, consult the manual or the Online Help available in FileMaker when it is open. The Online help is really helpful, just type Relationship in the Index window. HTH Lee
CobaltSky Posted September 25, 2004 Posted September 25, 2004 Hmmn... Whether or not a portal is required depends on whether there will ever be more than one record from file B which relates to any given record in file A. If each record in A has only one corresponding B record, then rather than using a portal (which lists a series of related records), you could simply place fields from B directly onto the layout in A and the correct B data will be sourced and displayed via the A-B relationship.
Lee Smith Posted September 26, 2004 Posted September 26, 2004 I know this, but he asked about the portal! Why are you always dancing on my toes?
CobaltSky Posted September 26, 2004 Posted September 26, 2004 Lee Smith Wrote: I know this, but he asked about the portal! I daresay you do, Lee, but wenzelj may not, and that, FWIW, is the point. Lee Smith Wrote: Why are you always dancing on my toes? Truly, I have no interest in your toes.
wenzelj Posted September 27, 2004 Author Posted September 27, 2004 When I create the relationship and enter the information all I get in the file where the info is supposed to be is "Name Insured Sec::Name School" or similar for each field in the record. None of the info comes out right. what am i doing wrong here?
-Queue- Posted September 27, 2004 Posted September 27, 2004 Try attaching a zipped sample of your file, so we can look at it.
wenzelj Posted September 27, 2004 Author Posted September 27, 2004 here it is. pword user. the part with the relationship is between policy holder info on students and the record in the school file. any other questions please ask....
-Queue- Posted September 27, 2004 Posted September 27, 2004 Did you change the name of either file? All of the relationships in students show <File Missing>. I do notice, however, that you have relationships defined for most of the address and phone fields. Is there a reason for this? You should only need one relationship to match the ID between the two records (in this case I would assume it's Policy Number). Then you can show all data in the related record using Policy Relationship::somefield. I don't see anywhere in the file where you're using the related data though.
wenzelj Posted September 28, 2004 Author Posted September 28, 2004 I did this quickly at the end of work. I'll redo it and try it again later.
wenzelj Posted September 28, 2004 Author Posted September 28, 2004 I got the whole relationship thing figured out. But one more question. I have to have the related field filled in for this to work. Is this customary or could it have to do with a script that I run to fill the other fields associated with the file? Thanks
-Queue- Posted September 28, 2004 Posted September 28, 2004 Most often one would use a portal to the related file with 'Allow creation of related records' selected in the relationship, so that the relationship is connected automatically when someone makes a new entry. However, you can also do this with a one-to-one relationship. Just put your related fields on the layout, make sure a policy number has been entered, and then enter your data. Since the 'Allow creation of related records' is activated, a new related record will be created if it doesn't already exist. See attached for example. pc.zip
wenzelj Posted September 28, 2004 Author Posted September 28, 2004 Here is a sample file of what I have been working with. Everything seems alright, just still trying to figure out the whole situation with having to enter the "policy number" before activating the other information in the relationship. I have a script set up on the Medical Policy Layout under "school insurance" that enters the information, yet this only happens when the policy number is already enter. Is there anyway to hit the button, activating the script and have all the information entered without having to enter the policy number prior. hope this is a little more clear now. students.zip
-Queue- Posted September 28, 2004 Posted September 28, 2004 Notice in my attachment above that there are no fields in the main file that are in the second file, except for the relationship's key field. In general, any data that is specific to the second file doesn't need to be in the first. You can remove all the insurance specific fields in the main file that are duplicates of those in the second, and simply use the related fields on your layout. No script should be necessary. Once you have the key fields (policy numbers) for the relationship entered, just enter the data in the related fields.
wenzelj Posted September 29, 2004 Author Posted September 29, 2004 Part of the problem lies within the fact that this relationship can exist for two different situations. One is for Primary and one for Secondary. It is not going to be necessarily one or the other. What I am trying to say is it differs depending upon the record.
-Queue- Posted September 29, 2004 Posted September 29, 2004 Not a problem at all. You have two different relationships, so each will be attached to a different record in the School Insurance Information file. Just use the same fields, but different relationships. For example, change the Name Insurance Co Prim field to be Ins Prim::Name Insurance Company and Name Insurance Co Sec to Ins Sec::Name Insurance Company, on the Policy Info layout. Repeat for the address, city, state, phone, etc. fields. When you enter a Contract Number for the primary, a new record will be created. When enter a Contract Number for the secondary, a new record will also be created. And each set of data (primary or secondary) will be linked to the correct School Insurance Information record. As long as you can't have one person's primary policy number be the same as someone else's secondary policy number, you should be fine.
Recommended Posts
This topic is 7417 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