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

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

Recommended Posts

Posted

Any help really appreciated - have been stuck on this problem for last 3 days!

Have a basic script when user peforms find, that takes to new layout showing find. Now want to show message in this layout if the end users find = '0'. I have this script:

Set error capture (on)

Show all records

Peform find (constrain found set)

If [status(currenterror) = <>0]

Show message [custom message]

End if

Go to layout["full record"]

Set field ["Total no of records']

I have changed it around, with Go to layout & set field above IF command. But it either just takes me to new layout and not show message or always shows messgae when found some records or none! Tried to read on forum for help, but to no avail. I keep hearing about global field, but not sure if need this?? If so, where does it go and what should it contain?

cheers (from a very confused Fm user!) Banghead.gif

Posted

I think the problem is that you need to use an "else" step. Try this.

Set error capture (on)

Show all records

Peform find (constrain found set)

If [status(currenterror) = <>0]

Show message [custom message]

Show all records

Else

Go to layout["full record"]

Set field ["Total no of records']

End If

Posted

FYI: The first Show All Records step is not needed as the found set is being replaced by the result of the Find.

Posted

Have made changes as suggested by Robert - cheers it works! I cam now sleep at night!

Have also removed unneccessary line as suggested by Ender.

THANKS!!!!!!!!!!!!!!!!!!!!!!!!BirthdayPartyGuy.gif

This topic is 7225 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.