AnsweredAssumed Answered

Having trouble with limiting the results of a “google type” search to display in a portal only 1 of each returned result where there may be duplicate matches.

Question asked by JeffTomb on Sep 7, 2015
Latest reply on Sep 7, 2015 by JeffTomb

I am working on a process to assign students to a class. There is a strong likelihood of duplicate student names. Due to the number of potential students and limited layout real estate, I have opted to use a “google type” search rather than use an auto-complete value list. However, currently all of the duplicates are displayed.


I currently have a Student Table containing those assigned to the class, and a Contact Table which contains all existing students.  I have a Cartesian relationship between the two tables - Students X Students|Contacts|All and I am filtering the portal using the following calculation – “IsEmpty ( Students::gSearch ) or  PatternCount ( Students|Contacts|All::Contact Name ; Students::gSearch)”  


The goal is to have the user begin to type the student’s name in the gSearch field and have the potential names displayed in a portal. If the name doesn’t exist the user is prompted to create one, if the name exists, they select the name in the portal and a script is used to check for duplicates, if no duplicates are found the student record is created, if duplicates exist, the user is presented with a new window displayed with the duplicate records and additional identifiers to allow the user to select the appropriate student, or create a new student if none in the list are the person in question. 


I am trying to combine a couple of techniques shown in Phil Caulkins example file “Adventures with Filemaker 2” but not having much luck.