Newbies Elrond Posted July 14, 2005 Newbies Posted July 14, 2005 Hi everyone I'm new to this site . I joined because I'm having trouble creating a script and no one in my organization is well versed in Filemaker except me. So I thought I could make use of your expertise. The problem is that I'm created a script that takes the user to a Find mode, populates a field called Form_Status with a valid value of "Active" (the valid values for this field are "Active, Inactive") and then moves to another field called Job_Title and waits for the user to enter the rest of the criteria to search for. The problem start there. I'm trying to create a script that does the following: When the user clicks on the botton I created on the layout to perform the Find without entering additional criteria, displays a message box stating something like "Please, enter a valid value to search for" then they click the button on the message box and return to Modify the search, but if they do enter a value I want to show a message if no records are found that says "No records found click on ok to try again or Cancel to return to the main menu" but if there is found records to go to a different layout and display the results of the search. So far I haven't been able to get it to work right. One more thing, the Status area is hidden so the users of this database will not be able to use it. Please, if you have any ideas let me know I've tried everything I can think of and I can't get it to do what I want it to do. I appreciate your help.
-Queue- Posted July 15, 2005 Posted July 15, 2005 Well, your code is in invisible on my machine. However, it sounds as if your Form_Status field may be a global, which would cause the missing criteria message to appear, since no criteria was entered into normal fields. To suppress error messages, use Set Error Capture [On] at the beginning of your script. Then use If [not Status(CurrentFoundCount)] Enter Find Mode [ ] Show Message ["No records found...] If [status(CurrentMessageChoice) = 1] {assuming the default button is Cancel} Go to Layout [Main] Show All Records Else Perform Script ["This Script"] End If Halt Script End If to trap and process a zero found count.
Recommended Posts
This topic is 7074 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