Hayley Posted February 14, 2005 Posted February 14, 2005 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!)
Robert Collins Posted February 14, 2005 Posted February 14, 2005 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
Ender Posted February 14, 2005 Posted February 14, 2005 FYI: The first Show All Records step is not needed as the found set is being replaced by the result of the Find.
Hayley Posted February 14, 2005 Author Posted February 14, 2005 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!!!!!!!!!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now