qwippo Posted November 11, 2008 Posted November 11, 2008 Stupid question, but it escapes me. I have a FileMaker 7 database on line through instant web publishing. It is searchable by the general public but I have been unable to successfully create a script saying no records match the search terms. This has to be drop-dead easy and I am embarrassed to ask but am compelled to. Just get me started. Thanks.
Vaughan Posted November 11, 2008 Posted November 11, 2008 Use the Set Error Capture [on] script step to stop FMP from issuing alerts, the trap the process yourself. Set Error Capture [on] Perform Find [] If [ Get( LastError ) ≠ 0 ] #no records match found set or so other error Else #some records found End If
qwippo Posted November 11, 2008 Author Posted November 11, 2008 (edited) Thanks Vaughan - the lines beginning with the # sign confuse me - are those verbatim? Edited November 11, 2008 by Guest
aldipalo Posted November 11, 2008 Posted November 11, 2008 (edited) No, they are comments. You would set a Custom Dialog or a field that would display the message. hth ** Sorry Vaughn, didn't see you were online, I saw 10:10 PM and thought it was from last night. B) Edited November 11, 2008 by Guest
qwippo Posted November 12, 2008 Author Posted November 12, 2008 Set Error Capture [on] Perform find [] If [( Get(LastError)= 0] Show custom dialog ["no records";"Sorry Qwippo does not . . . . "] Else Show custom dialog ["records";"Qwippo has found . . . "] End if The above is exactly what I have for a script that is triggered by clicking on a formatted button in an online (instant web publishing) database - the search works fine, but if I type in a search term that I know cannot be matched, I do not get the "Sorry, Qwippo does not have . . . ." message. What am I doing wrong? NOTE: The Get LastError is not "=" but the "not equal" symbol - which I could not find on my keyboard and the Show Custom Dialog lines are indented
Vaughan Posted November 13, 2008 Posted November 13, 2008 The Show Custom Dialog script step is NOT web compatible. That's why it's not working.
LaRetta Posted November 13, 2008 Posted November 13, 2008 (edited) To assit Vaughan in responding, let's answer this: Perform find [] It indicates that you have no Find Request to restore. Did you mean this or was it an accident? Vaughan! Dang you're fast! Missed the Custom Dialog error also. But Perform Find[] is naked!! Edited November 13, 2008 by Guest
Recommended Posts
This topic is 5856 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