Solved

Filemaker compare attributes

Posted on 2013-05-13
4
323 Views
Last Modified: 2013-12-14
Note that I have also posted this in another forum:-

http://forums.filemaker.com/posts/019a1d406a

I am trying to build a FM12 database for a dating agency,

Each person on the database has two characteristics that they select from a drop down (e.g Honesty, Sincerity, Caring, Vareity, Intelligence).

So Person 1 might select Honesty and Vareity for their chosen values. Person 2 might choose Vareity and Sincerity. So they have one common characteristic. Essentially I am trying to count the number of common characteristics between any two people in the database.

So far whatever method I have tried has given correct values from one side of the match but not the other. E.g if I compare person 1 and person 2, when I look at person 1 from person 2's profile I get the correct result, However if I look at person 2 from person 1's profile I get the wrong result.
0
Comment
Question by:Kap68
4 Comments
 
LVL 24

Accepted Solution

by:
Will Loving earned 500 total points
ID: 39161473
One way to do this is to use the FilterValues( ) function. In FileMaker terms, "values" in a field means the content of each line in a field separated by a carriage return. So, for example, the list:

Apple
Banana
Orange

contains three values, one for each line. Using the FilterValues( ) function you can compare two lists and find the common values. You can also use the ValueCount( ) function to count the number of values in a list.

In your example, it sounds like you have five separate characteristic fields. In order to compare the characteristic lists of two people and find the common values,  you'll first need to create a calculation field that makes list of a person's characteristics  using the List( ) function. A calc field called CharacteristicList might look like this:

CharacteristicList =
     List( Char1 ; Char2 ; Char3 ; Char 4 ; Char 5 )

The calculation result of this field for one person might look like this (I'm making up some other possible characteristics since I don't know all the values in your menus) :

Honesty
Sincerity
Active
Family
Sports

Another person might have a very different list such as:

Intelligence
Quiet
Sincerity
Family
Theater

Assuming you already have a way to temporarily relate two individuals (setting a global field with the other person's ID or creating a record in an intermediary table that relates both people to each other) you can use the FilterValues( ) function to find the common traits.

     FilterValues( PersonA::CharacteristicList ; PersonB::CharacteristicList )

The result of comparing the above two lists would be:

Sincerity
Family

To count the number of common traits, use:

     ValueCount( CharacteristicList )  

which in this case would = 2

For additional information on the FilterValues( ) function, see this FileMaker Help article:

https://www.filemaker.com/12help/html/func_ref3.33.53.html

and also this more general article:

http://www.dwaynewright.com/filemaker-thoughts/2010/12/19/filter-and-filtervalues-explored.html

In addition, if you have FileMaker Pro Advanced and therefore the ability to install Custom Functions in your database, there are a number of Custom Functions that can greatly enhance your ability to compare lists. Here is one example.

http://www.briandunning.com/cf/771
0
 

Author Comment

by:Kap68
ID: 39161601
Thanks - I am getting closer - this has helped enormously but I seem to get strange results occassionally.
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 39718586
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now