4 Replies Latest reply on Dec 18, 2009 3:32 PM by TSGal

    Bug: CWP compound query not interpreted correctly

    MartinBrändle

      Summary

      Bug: CWP compound query not interpreted correctly

      Description of the issue

      FileMaker Product(s) involved FileMaker Server 9FileMaker Server Advanced 9FileMaker Server 10FileMaker Server Advanced 10  Operating System(s) involved All OS compliant with products given above Detailed description of the issue Custom Web Publishing compound query URLs, that contain the following scheme, -query=(q1,q2)&-q1=field1&-q1.value=A&-q2=field1&-q2.value=B&-findquery e.g., that use the same field for request q1 and request q2, yield only a resultset that matches B. According to the documentation, both q1 and q2 must be combined with boolean AND for the form (q1,q2). However, if the field used for q1 and q2 is the same, only request q2 is interpreted, q1 is overridden, resulting in the wrong result set.  The Web Publishing Engine should interpret (q1,q2) correctly and internally rewrite the query to -query=(q1)&-q1=field1&-q1.value=A%20B&-findquery.  Expected Result Result set that matches A AND B in field1 Actual Result Result set that matches only B in field1  Exact text of any error message(s) that appeared None Any workarounds that you have found Queries that use the same field can only be written like this: -query=(q1)&-q1=field1&-q1.value=A%20B&-findquery   Request  Either fix the documentation or the Web Publishing Engine.  Similar bug reports (including test databases and XSLT files) had been submitted by me for FMS 7 and FMS 8 earlier (at that time for the former query URL format). Situation has only marginally improved since then.

        • 1. Re: Bug: CWP compound query not interpreted correctly
          TSGal

          Martin Brändle:

           

          Thank you for your post.

           

          I have forwarded your entire post to our Development and Software Quality Assurance (Testing) departments for review and confirmation.  When I hear more information, I will let you know.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Bug: CWP compound query not interpreted correctly
            TSGal

            Martin Brändle:

             

            Here is information I received back from Development and Testing:

             

            "Everything in the same set of parentheses is the same request.  If you want all records that have either the value specified by q1 or by q2, the correct syntax is:

             

            -query=(q1);(q2);

             

            This will make it into two find requests and perform an OR instead of an AND search on that field."

             

            Let me know if you need additional clarification.

             

            TSGal

            FileMaker, Inc. 

            • 3. Re: Bug: CWP compound query not interpreted correctly
              MartinBrändle
                

              TSGal,

               

              I'm not content with the answer from Development and Testing.

               

              The  FMS 10 Custom Web Publishing Guide with XML and XSLT clearly states on p. 96:

               

              "Enclosed in parentheses, the multiple queries act as logical AND searches that narrow the found set. For example, (q1, q2) returns records that match q1 and q2."  

               

              It is nowhere written that q1 and q2 must match different fields. So, to my interpretation they can match the same field, and hence the query values must be combined with boolean AND, which the CWPE does not.

               

              Either the CWPE must be changed to take account of such a situation, or the documentation must be written more clearly by stating that q1 and q2 must be associated with different fields in the case of (q1, q2).

               

              Best regards,

               

              Martin

              • 4. Re: Bug: CWP compound query not interpreted correctly
                TSGal

                Martin Brändle:

                 

                Considering it how long it took me to obtain the answer, I concur that this is not documented properly.  I have sent this thread to the manager of our documentation.

                 

                TSGal

                FileMaker, Inc.