saralee Posted June 8, 2010 Posted June 8, 2010 I have been working on my babies' records database and am now matching siblings based on the HouseholdID I set before. Here is the script I wrote for the siblings' matching case, but it is not working - it stopped after the first baby record. Could anybody take a look at it and enlighten me? ps I have two tables Household and Babies, and each baby is assigned a babyID and a householdID. Siblings should have the same householdID. I suspect that the double loops don't work because of the layout and actions I set for each loop, but no idea what is wrong. Thanks a lot!
comment Posted June 8, 2010 Posted June 8, 2010 Hm... what exactly is your script supposed to accomplish? It says "findSiblingIDs", but I am not sure what that means.
saralee Posted June 8, 2010 Author Posted June 8, 2010 Hi comment! Yeah.. so after I assigned householdID for each baby, I wanted to pull siblings info in the Household layout. Right now in my Household layout, I have parents profile information, and I just added a repeating field siblingIDs to contain all the siblings' IDs. This script is to find baby/babies for each household by matching baby's HouseholdID with each household ID ($HHid) in my household table. Hope it make sense! Thank you!
comment Posted June 8, 2010 Posted June 8, 2010 This is absolutely not necessary. Make sure you have a relationship between the two tables matching on HouseholdID. Then place a portal to Babies on a layout of Households (with the fields you want to show) and you're done.
saralee Posted June 8, 2010 Author Posted June 8, 2010 You are absolutely right!! I'm so glad that I asked this question. I felt it shouldn't have taken this much effort to do it but couldn't remember the power of portals... forgive my "newbieness" I'm learning... Thank you so much, Comment!!
Recommended Posts
This topic is 5281 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