AnsweredAssumed Answered

perform find using variable

Question asked by KBGF75 on Aug 13, 2009
Latest reply on Aug 13, 2009 by KBGF75


perform find using variable


My FMP9 file includes a table of Contacts and a table of Donations.  Donation records are related a donor‘s Contact record by contactID fields. 


From a Contacts layout, a new Donations record for that particular contact can be created with the following script:     

     Set Variable [$contactID; Value:Contacts::contactID_pk]    

     Go to Layout [“Donation Data Entry” (Donations)]     

     New Record/Request     

     Set Field [Donations::ContactID_fk; $contactID]     

     Go to Field [Donations::Date of Donation] 


This works, but the new Donations record is added to any existing Found Set of Donations records. I’d prefer to see only the Donation records (old and new) related to the particular contact. My (unsuccessful) approach has been to add this Perform Find step:     

     Perform Find [Restore], where specified “Action” is Find Records,      

     and specified “Criteria” is Donations::ContactID_fk: [$contactID]


The result is an error dialog, “No records match this set of find requests.” The file is still in Find mode, the contents of the ContactID_fk field are $contactID, and all other fields are blank. 


ContactID_fk is a number field. The field options are:   Validation: Always validate, Allow user to override during data entry, Strict data type (Numeric only), and Display custom message if validation fails.   Storage: Indexing: All 


Where am I going wrong?