9 Replies Latest reply on Dec 19, 2015 11:16 AM by HB

    Constrain Omit problem

    HB

      This is killing me.

       

      I want to narrow a found set in my script after doing a Perform Find. The results don't make sense.

       

      When I run the following:

      Filemaker1.JPG

      the found set includes records with a Product::Combined Price WO that is empty.

       

      But, when I run the following:

      Filemaker2.JPG

      which is part of the previous constrain set, it does not include records with the empty value - (which is what I want!)

       

      Why doesn't it work with the additional omit statementys in the same set??????

       

      Thanks in advance.

        • 1. Re: Constrain Omit problem
          Extensitech

          Initially, at least, this doesn't seem right to me, either. Let's troubleshoot.

           

          Is the layout on which you're doing the constrain based on Product?

           

          Can you click into the Product::Combined Price WO field, on the record that is erroneously included, and ensure it really doesn't contain something besides blank or zero? Perhaps a return or a space?

           

          Try running the script with just the establishment of the original found set and the constrain, just to be sure we're looking in the right place for the error. There appear to be many steps after the constrain (some of which we can't see in the screenshot) and we should rule those out as suspects.

           

          Chris Cain

          Extensitech

          • 2. Re: Constrain Omit problem
            HB

            The layout is based on Product

            The value in question =0 - see last line of the watch:;

            Filemaker3.JPG

            I stopped just after the Constrain step - see step 16 - and exited - btw - the constrain step does show an error - see red text at bottom - could that have anything to do with it???:

            Filemaker4.JPG

            • 3. Re: Constrain Omit problem
              HB

              When I add a few omit statements to the Constrain action, doesn't it start at the top, omit the records that match from the current found, then remove again according to the next statement one line down etc..etc..?

              • 4. Re: Constrain Omit problem
                Extensitech

                Hmm. I'm puzzled. If you're getting a 401 error, doesn't that mean you also have a zero found count? Isn't that what you were expecting? If you didn't find any records, than what record is showing a bad value?

                 

                Could you add get ( foundcount ) to your watch list and do that second screenshot again?

                 

                Chris Cain

                Extensitech

                • 5. Re: Constrain Omit problem
                  HB

                  I FOUND THE PROBLEM...  the error in one of the top statements of the Constrain step (I referred to a mispelled variable that didn't exist) caused Filemaker to exit the whole constrain...i guess - fixed the mispell and now it works...thanks for looking at this.

                  • 6. Re: Constrain Omit problem
                    Extensitech

                    Good to hear!

                    • 7. Re: Constrain Omit problem
                      BruceRobertson

                      Yet another case for NOT using Perform Find [ Restore ].

                      Especially when you are asking other people to help you, explicit scripted finds are MUCH easier to troubleshoot.

                      Enter Find Mode [ ]

                      Set Field [ someField; someValue

                      Set Field [ OtherField; otherValue]

                      # etc

                      Perform find [ ]

                      • 8. Re: Constrain Omit problem
                        dtcgnet

                        +1 to Bruce's comment.

                        • 9. Re: Constrain Omit problem
                          HB

                          I will keep that in mind - thanks