Hi Janice,
On 9/21/07 2:37 PM, "Janice Lathen" <[EMAIL PROTECTED]> wrote:
> I'm in FM 6 v2 on a Mac. How can I take a user to a
> specific layout if a user cancels a script?
>
> One step in a script finds records and if there are
> records that match the request the script goes to the
> HS Visit layout. If there are no records which match
> the request (No records match this request box) and
> the user clicks the cancel (or continue) button, I
> want the script to go to the Main Page layout.
Use the Set Error Capture[On] and Allow User About [Off] script steps to
manage the process. As in:
Allow User Abort [Off] // removes Cancel button from status area
Set Error Capture [On] // lets you trap for the no found set error
& prevents the No record match this request box
- you may want to add your own message dialog
Enter Find Mode [Pause[ // waits for user to enter criteria
Perform Find [ ] // processes the find request
If [Get(FoundCount) = 0
Go to Layout ["HS Visit" (table occurrence name)]
Else
Go to Layout ["Main Page" (table occurrence name)]
End If
HTH,
Michele
--
Michele Olson
AppleSauce Productions, Inc.
218-327-2671
www.applesaucepro.com
FileMaker Certified Developer | FileMaker Business Alliance