2 Replies Latest reply on Nov 13, 2012 7:46 AM by ChrisSmythe

    Script - How many records are in the Found Set

    ChrisSmythe

      Title

      Script - How many records are in the Found Set

      Post

           Hello, I am using FileMaker Pro v12 on Windows XP and like some help please modifying my attached script to do the following:

           I need the script to display to the user a message box that tells them how many records were found in the Found Set after the script performed its Perform Find step?

           Kind regards,

           Chris smiley

            

      Script_6.jpg

        • 1. Re: Script - How many records are in the Found Set
          Sorbsbuster

               You should not have the 'Restore' option on the first 'Enter Find Mode' step, I suspect, as you then set the serach criteria.

               You don't need to set the Error Capture Off in this script as it will return to On when the script finishes.

               Immediately below the Perform Find script step add:

               Show Custom Dialogue.  Title it with: Get ( FoundCount ) &  " Records found", and a fuller explanation in the message box

               If you want the user simply to be informed that is enough, and you can remove the default button of 'Cancel'.  If you want them to have a choice of what to do (such as cancelling) you can add:

               If [Get ( LastMessageChoice ) = 2
               #Cancel chosen
               Go To Layout (Original Layout)
               Halt Script
               End If

                

                

                

          • 2. Re: Script - How many records are in the Found Set
            ChrisSmythe

                 Thank you Sorbsbuster, I implemented all your excellent suggestions and my scripts works well now - greatly appreciated.

                 Kind regards,

                 Chris smiley