September 11, 200916 yr Newbies I am trying to run a script that will find people depending on the letter that their surname begins with. The script does not show the custom dialogue message when records are not found. Any suggestions gratefully received. Set error capture [on] Enter find mode[] Insert calculated result[select; surname field; get (scriptparameter)] Perform find [] If [get(lasterror)=401] Show custom dialogue[“Message”;”There are no surnames starting with the letter “&get (scriptparameter)] End if
September 11, 200916 yr I would have written: Set error capture [on] Enter find mode[] SET FIELD [surname field; get (scriptparameter)] Perform find [] If [get(FOUNDCOUNT)=0] Show custom dialogue[“Message”;”There are no surnames starting with the letter “&get (scriptparameter)] End if You may also wish to do some validation at the top of the script to make sure that it is only called from the correct table, and to make sure that there is a parameter passed to it. James
Create an account or sign in to comment