Solved

Filemaker compare attributes

Posted on 2013-05-13
4
326 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FM - Mouse Scroll 3 525
FM - Sorting Titles 5 68
FM - Design Issue 6 145
FM - Dialog box seems to get past a field's date validation. 2 45
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…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

861 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

22 Experts available now in Live!

Get 1:1 Help Now