Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3322 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

FM 12 Adv. When I run the following script, it produces the error message “This script cannot be found or has been deleted” when it reaches the Go to Layout step. After I click ok, the script continues, finding and sorting the correct set of records.

Enter Browse Mode

Set Variable [ $$Issue; Value:VisitNotes::gIssue ]

Go to Layout [ “Issue Report” (VisitNotes) ]

Enter Find Mode [ ]

Set Field [ VisitNotes::Issue; $$Issue ]

Perform Find [ ]

Sort Records [ Keep records in sorted order; Specified Sort Order: VisitNotes::VisitDate; descending ] [ Restore; No dialog ]

Go to Record/Request/Page [ First ]

I can’t figure out why the message appears.

Posted

Hi John,

Aside from your error message, which I believe Comment is handling perfectly, a few other things caught my eye:

  1. Why set the variable?  It appears that the user enters their request into a global field called gIssue?  If so, you can access the global from anywhere and there is no need for setting that variable at all - just set your find directly with the global value.
  2. Even if you really needed to set the variable, there is no need to use a GLOBAL variable $$ unless you want to display that 'find request value' on the Issue Report.

It is best to use local variables as much as possible since they disintegrate naturally when the script ends.

An additional suggestion, it appears you have FMP Advanced so you can turn on debugger and watch the script progress.  The problem should pop up at you.  :-)

This topic is 3322 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.