February 14, 200520 yr 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!)
February 14, 200520 yr 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
February 14, 200520 yr FYI: The first Show All Records step is not needed as the found set is being replaced by the result of the Find.
February 14, 200520 yr Author 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!!!!!!!!!
Create an account or sign in to comment