AnsweredAssumed Answered

Portal to display records with a partially matching field

Question asked by steveald on Mar 14, 2014
Latest reply on Mar 18, 2014 by steveald

Title

Portal to display records with a partially matching field

Post

     I have a FMP 11 database with a large number of records, among which there are duplicates I would like to reveal - i.e., when someone creates a new record and enters "Act Now" in the Name field, the portal would display all the other records already created with "Act Now" in the Name field. Better yet, it should also display all records with "Act" in the Name field - like "First Act Theater" and "Act Industries" (though I don't think it needs to go as far as finding the "act" in "Reactor Electric").

     To be most useful though, it should probably reveal the partial duplicates as they type - i.e., type an "A" and records containing "Act Now" and "Ace Hardware" and "First Act Theater" and "Aluminum Products" appear; add a "c" and the portal list would shorten to just the first three entries; add a "t" and only "Act Now" and "First Act Theater" would be left.

     Following other posts I've found, I set up a self-join relationship using the Name field and I set up a filtered portal to display the duplicate results. I also tried setting up a script trigger to act on letters as they were typed in the Name field. But I'm not having any luck getting the portal to display everything I would like it to. Mostly what I end up with is records where the entire field is an exact match. Even when I set the portal filter to only look at the first word. The script trigger directions I found won't work because they are from 2011 and parts of it like OnObjectModify don't appear to exist anymore in FMP 11.

     Can someone get me pointed in the right direction? 

 

Outcomes