AnsweredAssumed Answered

FMP9 script won't work in FMP7

Question asked by KBGF75 on May 19, 2011
Latest reply on May 24, 2011 by KBGF75

Title

FMP9 script won't work in FMP7

Post

I’m using FMP9 with a file containing three tables. The Contacts and Donations tables are most used. The main Contact layout (contact data entry) has a button titled “Create New Donation Record.” The related script, shown immediately below, creates a new record in the donations data entry layout. The script has worked well on Windows PCs for several years. Contact records and Donation records are related by a contactID number.

Recently I tried hosting the file on an old iMac (OS X v.10.3.9) using FMP7. Most other scripts perform normally, but Create New Donation Record does not. When I looked at the script in the iMac file, some of the steps had been corrupted. That appears to be because certain script steps in FM9 are not recognized in FM7. This iMac/FM7 script is shown below at bottom.

I hope this is enough information for someone to edit the FM7 script so it will do the job on the iMac, or at least point me in the right direction. 

        -Al

Script 5. create new Donation record  (FM9)

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

Go to Layout ["Donation Data Entry" (Donations)]

New Record/Request

Set Field [ Donations::ContactID_fk;  $contactID]

Perform Find [ ]

Set Field [Donations::ContactID_fk;  $contactID]

Perform Find [ ]

Sort Records [Restore; No dialog]

Go to Record/Request/Page [ Last ]

Go to Field [Donations::Date of donation]

 

Script 5. create new Donation record  (FM7)

[ "$contactID" ]

Go to Layout [ "Donation Data Entry" (Donations) ]

New Record/Request

Set Field [ Donations::ContactID_fk; <Function Missing><Function Missing>TimestampLnTruncateSqrtExpFactorialLnExp"¥" ]

Enter Find Mode [  ]

Set Field [ Donations::ContactID_fk; <Function Missing><Function Missing>TimestampLnTruncateSqrtExpFactorialLnExp"¥" ]

Perform Find [  ]

Sort Records [ Specified Sort Order: Donations::Date don. record created; ascending ] [ Restore; No dialog ]

Go to Record/Request/Page [ Last ]

Go to Field [ Donations::Date of donation ]

END MESSAGE

Outcomes