grumbachr Posted April 7, 2008 Posted April 7, 2008 I'm really struggling with how to even ask this question it makes sense in my head but as I type I feel I can't express this clearly but its a simple idea. I need to calculate/lookup/assign the next number/value based on the number related family members. I'd like this to happen when the family number is assigned. So the first person in family 001 would be 01 2nd person in family 001 would be 02 3rd person in family 001 would be 03 and so on. I've stared by trying this but it doesn't work because it easily broken. Let ($Family_Count = Count ( Contacts Family Portal::Family_ID ); $Family_Count + 1 ) This doesn't work well be cause person 1 get nothing and once I make a relationship both get assigned 2. Is there a different funtion I should look at? Thanks in advance.
mr_vodka Posted April 7, 2008 Posted April 7, 2008 You will need to use a self join keyed on family ID. Max ( FamilySelfJoin::Family_Count )+ 1 However, I would not use this as a primary key. It is unreliable. Also I dont know your complete structure, but you may want to seperate out family and members into their own tables if there is specific info for each type.
grumbachr Posted April 7, 2008 Author Posted April 7, 2008 So I should be looking at adding a join table to accomplish this? If you are interested i've attached the file I'm working with. Family_Sample.fp7.zip
Raybaudi Posted April 7, 2008 Posted April 7, 2008 (edited) This is your file modified... P.S.: new attachment FamilyMod.zip Edited April 7, 2008 by Guest new attachment
Recommended Posts
This topic is 6134 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