Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5552 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.