April 7, 200817 yr 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.
April 7, 200817 yr 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.
April 7, 200817 yr Author 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
April 7, 200817 yr This is your file modified... P.S.: new attachment FamilyMod.zip Edited April 7, 200817 yr by Guest new attachment
Create an account or sign in to comment