November 11, 200817 yr 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.
November 11, 200817 yr 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
November 11, 200817 yr Author Thanks Vaughan - the lines beginning with the # sign confuse me - are those verbatim? Edited November 11, 200817 yr by Guest
November 11, 200817 yr 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, 200817 yr by Guest
November 12, 200817 yr Author 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
November 13, 200817 yr The Show Custom Dialog script step is NOT web compatible. That's why it's not working.
November 13, 200817 yr 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, 200817 yr by Guest
Create an account or sign in to comment