AnsweredAssumed Answered

Inconsistent Find Results when using a scripted search on a related field

Question asked by wadef on Feb 26, 2010
Latest reply on Feb 27, 2010 by wadef


Inconsistent Find Results when using a scripted search on a related field


I'm new to databases in general and Filemaker in particular and am experimenting with the demo version of FilemakerPro 10 on my Mac (OS X 10.6.2)


I'm trying to set up a database to track my investment activities and portfolio.  I'm starting with 2 related tables: one for Activities (buy, sell, dividends, etc) and one for individual Securities (stocks, bonds, etc).  The activities table is populated with records of various actions including the stock name and symbol (from the related Securities table)


I'm having difficulty trying to find all records related to a single stock symbol when I search via a script.


I am able to successfully set up a search based on any field other than the ::symbol field.  E.G. I can find all records with price < nn, or quantity > mmm.  However, when I try to find all records with a symbol (text), I get inconsistent results.  (e.g. "no records match this set of find requests" when I set the search on one symbol, and the wrong records when I set the search up for a different symbol)


The script I am using is 


Go to Layout ["Activities Register" (Activities Register)]

Enter Find Mode [ ]

Set Field [Activites Register::Symbol_or_CUSIP; "BCE"]  (works OK on different field such as Price; >25)

Perform Find [ ]


I can do the search by going to Find Mode, entering the symbol in the corresponding field and clicking on the 'Perform Find' button, but I want to do further processing on the found data (e.g. find the last record of the set, and repeat the process for other symbols).  But for some reason, the 'Perform Find' script works differently from the button.