saralee Posted July 20, 2010 Posted July 20, 2010 Hi everyone, I have created a portal in the HouseHold layout to contain the household's cultural information (Asian, American etc) This info comes from each baby's record. Since each baby record contains cultural information, household with more than one kid would have duplicate cultural information (each sibling would have the same cultural info) So in my portal, the same cultural info would show up twice or more depending on the siblings' number. Is there a way to get rid of the duplicates in the portal? Is scriping the only way? I have a feeling that there should be a better way to develop this portal. Please advice. Thank you!
bruceR Posted July 20, 2010 Posted July 20, 2010 Get FileMaker 11. It can be done with portal filtering, several examples of this kind of thing have been created.
comment Posted July 20, 2010 Posted July 20, 2010 Since each baby record contains cultural information, household with more than one kid would have duplicate cultural information (each sibling would have the same cultural info) I think what you are saying is that the cultural information is an attribute of household.
saralee Posted July 20, 2010 Author Posted July 20, 2010 Thank you both! Yes, you are right, comment - cultural info is the attribute of the household, but for household with more than more kid, the same cultural info will be duplicated in the culture portal in the household layout.. All I want is to get make my culture layout only contain the unique combinations of householdID and culture. That way in my culture portal I will only get the single value for the same culture info. Am I making senses here? I only have FM 10~~ any other way to solve the problem? I know in Access, you can define a combinnation of several keys to have a unique value. Thanks :)
saralee Posted July 20, 2010 Author Posted July 20, 2010 Thanks, Bruce. Is there any way to go around? I don't think we can get FM 11 at this point... Let me know. Thanks a lot! :)
comment Posted July 20, 2010 Posted July 20, 2010 cultural info is the attribute of the household Why is it in the Babies table, then? BTW, it's not entirely clear how this info is being recorded - it seems a single household could have multiple values?
saralee Posted July 20, 2010 Author Posted July 20, 2010 Yeah.. the thing is that I migrated the cultural related data from the original big giant table which has everyhing, and that comes with only the babyID. At this point, I created tblBabies and tblHousehold, so I had to link my tblCulture with tblBabies first to retrieve the householdID, and then I linked tblCulture with tblHousehold. so now in my tblCulture, I have duplications.. therefore in my portal Culture in the household layout, it is giving me duplications as well.. I hope it makes sense! :)
comment Posted July 20, 2010 Posted July 20, 2010 You haven't answered my question regarding multiple values. Is there a one-to-many relationship between tblBabies and tblCulture?
saralee Posted July 20, 2010 Author Posted July 20, 2010 Oh yeah, sorry.. Yes, it is a one-to-many relationship between babies and cultures.. it was a repeating field in the original table, and I splitted it while importing.. so now I have a culture table with multiple culture values per babies.. Thanks, comment :)
comment Posted July 20, 2010 Posted July 20, 2010 I think you should add a HouseholdID field to the Culture table, populate it with the related HouseholdID value in the Babies table, and remove the duplicates. Then link it directly to the Households table.
saralee Posted July 20, 2010 Author Posted July 20, 2010 Yes, I did have a household ID with the culture table, and that was gotten from the baby table.. now I just don't know how to remove the duplicates.. haha.. sorry this might have been another simple question that I just couldn't think around.. Please advice~
comment Posted July 20, 2010 Posted July 20, 2010 Define a new table with the following fields: • SerialID (auto-enter serial number) • HouseholdID • Culture • Validator Set Validator to be a Text field, with auto-entered calculation (replacing existing value) = HouseholdID & "|" & Culture Set the Validator field's validation to Unique, Validate always. Import the records from Culture table into the new table, mapping HouseholdID to HouseholdID and Culture to Culture. Check your results, and if everything is OK you can delete the Validator field and the old Culture table. As always, make sure you have a backup before trying this.
saralee Posted July 20, 2010 Author Posted July 20, 2010 Thank you so much, comment! Now I know how to remove duplicates in tables in general :)
Recommended Posts
This topic is 5239 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