Newbies KSE Posted September 11, 2009 Newbies Posted September 11, 2009 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
jamesducker Posted September 11, 2009 Posted September 11, 2009 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
Newbies KSE Posted September 11, 2009 Author Newbies Posted September 11, 2009 thankyou very much, it worked perfectly.
Recommended Posts
This topic is 5552 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