6 Replies Latest reply on Jun 29, 2009 10:47 PM by datablaze

    Found Count = 0

    datablaze

      Title

      Found Count = 0

      Post

      Just started working in FMP 10 (last used FMP 6.0). I feel like a complete idiot. I miss my [Status] functions. How can I get a script step to return zero found records? After the FIND step (that should produce zer records) all I get is the message that "No Records Match This Set of Find Requests" and then it shows ALL records. The step... If [Get (Found Count) = 0] doesn't seem to work the way the [Status (Current Found Count) = 0] did.  It's entirely possible that I've lost perspective but if anyone can point me in the right direction I'd be very grateful.

       

      I. French

        • 1. Re: Found Count = 0
          davidanders
            

          Show All Records

          Show Omitted Only 

          (works for me)

           

          David 

          • 2. Re: Found Count = 0
            comment_1
              

            Frencin wrote:

            How can I get a script step to return zero found records?


            Try:

             

            Omit Multiple Records [ Get (FoundCount) ]

             


            • 3. Re: Found Count = 0
              datablaze
                

              I appreciat the quick responses but I guess I wasn't very articulate. My script steps are (with Error Capture On) ...

              Enter Find Mode (Restore)

              Perform Find/Replace

              If [Get (Found Count) > 0 

              .. Perform (another) script ...

              Else ... Exit Script

              I've also tried it this way ...

              Enter Find Mode (Restore)

              Perform Find/Replace

              If [Get (Found Count) =  0  

              Exit Script

              Else ... perform (another) script ...

               In both instances the found count should have been zero but because it does not actually return a zero count, it shows all records and thereby considers the found set to be > 0. Now, it's probably some stupid little thing I'm missing but I've been wracking with this for too long today and just can't seem to move past it. Thanks for your patience, I know you all have a simple answer for me (I'm hoping anyway).

               

              I. French

              • 4. Re: Found Count = 0
                davidhead
                  

                Frencin wrote:

                ... My script steps are (with Error Capture On) ...

                Enter Find Mode (Restore)

                Perform Find/Replace

                If [Get (Found Count) > 0 

                .. Perform (another) script ...

                Else ... Exit Script

                 

                 

                Perform Find/Replace is the wrong script step to use there - you should be using Perform Find. 

                 

                • 5. Re: Found Count = 0
                  comment_1
                    

                  Try it this way:

                   

                  Set Error Capture [ On ]

                  Perform Find [ Restore ]

                  If [ Get (FoundCount) ]

                  # DO THIS

                  Else

                  # DO THAT

                  End If

                  • 6. Re: Found Count = 0
                    datablaze
                      

                    Thanks for taking the time to answer this - I knew it would be something simple I was overlooking (happens a lot when I'm multi-tasking and missing the trees ...) I haven't had a chance to check your solution but it sounds perfectly logical. 

                     

                    I haven't worked in FMP for a few years and FMP 10 is looking a whole lot different. Sure hope I can make the adjustment.

                     

                    Cheers,

                    I. French