2 Replies Latest reply on Nov 5, 2010 5:58 AM by michael_1

    Report error with no entries

    michael_1

      Title

      Report error with no entries

      Post

      Hi all I said I'd be back. I have mastered FM for what I need but what is bugging me is when I make a specific find report up and it finds no entries it brings up the script continue dialog box but I want it to go back to the origional screen where the user came from. I would also like a message to come up like "no entries"

      Can anyone help?

        • 1. Re: Report error with no entries
          LaRetta_1

          To stop the message, you need to include error capture.  This means also that you need to trap for the errors yourself.  So script might look like:

          Go To Layout [ layout to perform your find ]
          Enter Find Mode [ ]
          Set Field [ whatever ; value ]
          Set Error Capture [ On ]
          Perform Find ()
          If [ not Get ( FoundCount ) // no records found ]
          Show Custom Dialog [ "No records were found." ]
          Show All Records
          Go To Layout [ Original Layout ]
          Exit Script
          End If
          ... from here on, your script will assume records were found.  Do whatever you wish with the found set.

          • 2. Re: Report error with no entries
            michael_1

            Absoutely terrific

            Thanks a million