wingwalker Posted March 10, 2006 Posted March 10, 2006 I have two buttons. One that finds all tenants whose rent is past due. And another that does some administrative work and then goes to the layout where a past due letter can be viewed and printed. I need your help with two script issues. 1. Find Late: If I click on the Find button and there are no records found I get the standard FileMaker dialog box “No records match this set of find request” with the Cancel, Continue and Modify Find buttons that no one ever seems to know what to do with. How do you write a script, when there are no records found, that brings up a custom dialog box that says, “No Tenants found with Late Rent.” And a simple OK button that leaves you at the layout where you called the script. 2. Send Late Notice: Right now if someone forgets to click the above Find Late button and just clicks the Send Late Notice button. It will set things up to send a late notice to everyone. How can I set up a script that will only run if records are first found by the Find Late button? Maybe even with a dialog box that says, "You must first click the Find Late button"! How cool would that be. Thanks for your help, James
Zero Tolerence Posted March 10, 2006 Posted March 10, 2006 1. Set Error Capture ON Then, after you Perform Find do this If[Get(LastError) ≠ 0] Show Dialog End If 2. A few things you could do, Since I don't know much about your structure, I'll list a few. Create a global field, Mark it with something at the begginning of your "Find Late" script, unmark it at the end of the "Send Late" script. Then, in your send Late Script, you would put: If(IsEmpty(GlobalField)] Do your stuff Else Show Custom Dialog "You must first click the ...." End If Or, if say, You know if they haven't "Found Late" yet, then you're found count will = your total Record count you can do it like this. If[Get(FoundCount) = Get(TotalRecordCount)] Show Custom Dialog "You must first click the..." Else Do your stuff End If
wingwalker Posted March 22, 2006 Author Posted March 22, 2006 Zero, that was great and works perfectly. Thanks a lot. James
Recommended Posts
This topic is 6823 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