1 Reply Latest reply on Feb 4, 2009 9:15 AM by Orlando

    How to get rid of dialog box when performing a find with no results

    Thicks

      Title

      How to get rid of dialog box when performing a find with no results

      Post

      I have a script which performs a find on my records, however if there are no results to return a dialog box pops up and ask if I would like to modify the results. I will have other people using this database and I just want them to see that there were no cases for there district and not have the modify box appear. How can I do this?

       

      Thanks

        • 1. Re: How to get rid of dialog box when performing a find with no results
          Orlando
            

          To get rid of the dialog that appears when the script finds no records you want to use the Set Error Capture script step, and set it to "On"

           

          You can then use the Get ( FoundCount ) in an If step to display a message of your own, or perform some other task. 

           

          So following on from you last post your script would look something like this. 

           

          #
          Set Error Capture [On] 
          # 
          Enter Find Mode [] // Deselect 'Pause' 
          Set Field [ TABLE::case# ; "E" ]
          New Record/Request
          Set Field [ TABLE::case# ; "D" ]
          Perform Find []   

          #// Check result and if no records found alert user.
          If [ Get ( FoundCount ) = 0 ]
          Show Custom Dialog ["Message" ; "No Records Found."]
          Enter Browse Mode []

          End If 
          #