AnsweredAssumed Answered

Matching characteristics

Question asked by Kaps_1 on May 10, 2013
Latest reply on May 15, 2013 by philmodjunk

Title

Matching characteristics

Post

     I am trying to build a FM12 database for a dating agency. Each person on the database is stored in a table called "Contacts". Each contact has two fields called "Selected Personal goals 1" and  "Selected Personal Goals 2". The values for these fields are selecxted from a dropdown and contain values such as :-

     * Honesty

     * Certainty

     * Intimacy and Love

     * Significance

     * Contribution

     I am trying to count the number of matches on these values. The match is stored in a field called "Match on Personal Goals".

      

     So if Person 1 says that his personal goals are "Honesty"  and "Certainty" and Person 2 says that their personal goals are "Significance" and "Certainty" then there is one match. So the field containing "Match on Personal Goals" has the value 2.

     So if Person 1 says that his personal goals are "Honesty"  and "Certainty" and Person 2 says that their personal goals are "Significance" and "Honesty" then there is one match. So the field containing "Match on Personal Goals" has the value 1.

     Likewise if Person 1 says his personal goals are "Honesty"  and "Certainty" and Person 2 says that their personal goals are "Significance" and "Contribution" then there are no matches. So the field containing "Match on Personal Goals" has the value 0.

     I am computing the field "Match on Personal goals" in two steps:-

     match on personal goal one =

     If((second Contact::selected personal goal two=selected personal goal one) or (second Contact::selected personal goal one=selected personal goal one);1;0)

     match on personal goal two =

     If((second Contact::selected personal goal one=selected personal goal two) or (second Contact::selected personal goal two=selected personal goal two);1;0)

     and then :-

     match on personal goals = Sum(match on personal goal one;match on personal goal two)

     I am finding that I get correct results one way, but not the other. So with the reference to the screen shot, Paula Price has one match with Mark Anthony - which is correct. However, if I look at Mark Anthony's profile it shows no matches with Paula Price.

     The portal is a self join with the contacts table and is called Second Contact.

     I also need to do this with "Selected values" but that has 5 comparisons. Thanks

     regards

     Kaps

      

      

      

      

4l4g.jpg

Outcomes