September 28, 20196 yr This should be straight forward but it's not - to a newbie anyway. What I'm trying to do is perform a find based on a date calculation of a membership database. If the find doesn't locate any records, it should show the custom dialog that says, "No membership renewals due in 7 days." When you hit 'OK' it will go back to a layout called "Member Detail" and sort all the records in the database. If it finds any records it will go to a new card window, sort them and display the records found. The problem is when it doesn't find any records the default Filemaker dialog pops up first saying, "No records match this find criteria." and has the usual 'Cancel', 'Continie' and 'Modify Find' buttons showing. If you hit the Continue button, then my custom dialog pops up. How do I stop the default dialog popping up and just have my custom dialog show? The script is shown below. Thanks, James. Enter Find Mode [ ] Set Field [ MEMBER::Membership Date Due; Get ( CurrentDate ) + 7 & "..." & Get ( CurrentDate ) + 7 ] Perform Find [ ] If [ Get ( FoundCount ) = 0 ] Show Custom Dialog [ Title: "7 Day Search Results"; Message: "No membership renewals due in 7 days."; Default Button: “OK”, Commit: “Yes” ] Go to Layout [ “Member Detail” (MEMBER) ] Show All Records Sort Records [ Keep records in sorted order; Specified Sort Order: MEMBER::Name_Last; ascending ] [ Restore; No dialog ] Else If [ Get ( FoundCount ) > 0 ] New Window [ Style: Card; Name: "Upcoming Membership Renewals"; Using layout: “Memberships Due In 7 Days” (MEMBER); Close: Yes; Minimize: No; Maximize: No; Resize: No; Menu Bar: No; Dim parent window: Yes; Toolbars: No ] Sort Records [ Keep records in sorted order; Specified Sort Order: MEMBER::Member_Name; ascending ] [ Restore; No dialog ] Go to Record/Request/Page [ First ] Else Go to Layout [ “Dashboard” (_GLOBAL) ] End If
September 29, 20196 yr Author All good. After hours of trying all sorts of things, it was as simple as turning on Error Capture right at the start.
Create an account or sign in to comment