AnsweredAssumed Answered

Error trapping strangeness

Question asked by RickWhitelaw on Jan 9, 2010
Latest reply on Jan 11, 2010 by comment_1


Error trapping strangeness


I'm having an issue that the script below resolves.(!) The strange thing is that, originally, the seventh line down was If[Get(LastError)=401] and, even if the find came up empty, there was no Error 401 returned. This defeated the whole purpose of the routine. Everything else worked fine (Script Parameter etc.). Ideas? Either I'm missing something dead obvious (I've done this TOO many times) or something is odd. BTW, I know that if I use the script as it is below, I can ditch the error capturing.




New Window [ Top: 800 ]

Go to Layout [ “Associate Contractor Details” (ASST_MAN_FEE) ]

Set Error Capture [ On ]

Enter Find Mode [ ]

Set Field [ ASST_MAN_FEE::PROD_DAT; Get ( ScriptParameter ) ]

Perform Find [ ]

If [ Get ( FoundCount ) = 0 ]

Show Custom Dialog [ Message: "There is no Assistant listed for this engagement and date."; Buttons: “Exit” ] If [ Get ( LastMessageChoice ) = 1 ]

Close Window [ Current Window ]

Exit Script [ ]

End If

End If