Solved

Filemaker compare attributes

Posted on 2013-05-13
4
351 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 25

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

631 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