Brainiac58 Posted March 12, 2007 Posted March 12, 2007 (edited) I have a script that gets the current date, adds 7 to it and then displays all medical appointments in the database that fall between the current date & current date +7 days. The script is working great as long as there are appointments that fall in that range. If there are no appointments it gives me a message that no records can be found, puts "3/12/2007...3/19/07" (the range it is looking for) and most concernsing, when I try to enter Find Mode in different layouts, I get booted out of Filemaker and have to restart it. The current script is as follows: Enter Find Mode [] Go to Layout ["MedAppTick" (MedAppoint)] Set Field [MedAppoint::MedAppDate;Get(currentdate) & "..." & Get(currentdate+7)] Perform Find [] Show/Hide status area [Hide] Adjust Window [Resize to Fit] Can anyone tell me how I need to adjust script to stop the problems described above? Thanks Edited March 12, 2007 by Guest
mr_vodka Posted March 12, 2007 Posted March 12, 2007 I am not sure why its crashing. Possible corruption. As for the error, turn on Error Capture Set Error Capture [ On ] Show/Hide status area [Hide] Go to Layout ["MedAppTick" (MedAppoint)] Enter Find Mode [] Set Field [MedAppoint::MedAppDate;G et(currentdate) & "..." & Get(currentdate+7)] Perform Find [] If [ not Get ( FoundCount ) ] Go to Layout [original layout] Show custom dialog ["Error"; "There are no records found... etc etc."] Else Adjust Window [Resize to Fit] End If
Brainiac58 Posted March 12, 2007 Author Posted March 12, 2007 Hi Mr. Vodka, Thanks for the quick response. i have a question about the If/Else/Iff. Do I need to put anything else in the: if [ not Get(FoundCount)] When I enter this in scriptmaker it gives me the following response "A number, text constant, field name or "(" is expected here". Thanks.
mr_vodka Posted March 12, 2007 Posted March 12, 2007 not Get (Found count) should be fine. It is basically returning a boolean value. Check the rest of your script steps.
Recommended Posts
This topic is 6467 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 accountSign in
Already have an account? Sign in here.
Sign In Now