SQL query: "is equal to" does not work. - InfoPath Dev
in

InfoPath Dev

SQL query: "is equal to" does not work.

Last post 08-15-2009 09:07 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-14-2009 09:55 AM

    • Mosel
    • Not Ranked
    • Joined on 06-25-2009
    • Posts 12

    SQL query: "is equal to" does not work.

    Hello all!I am trying to count the number of times an entry is displayed in a SQL query.

    I tried using the count(d:ROUTELOG/@DROPID[. = "SF215FMT-05"]) in an expression box but it does not seem to work. When I try using count(d:ROUTELOG/@DROPID[contains(., "SF215FMT-05")]) it counts the SF215FMT-05 entry but it also counts the other entries (SF215FMT-06, SF215FMT-07 and so on).

    How can I have IP count only the SF215FMT-05 without all the other entries counted?

    Thank you.

     

  • 08-15-2009 09:07 AM In reply to

    Re: SQL query: "is equal to" does not work.

     contains(., "SF215FMT-05") should not be true unless @DROPID contains the entire string "SF215FMT-05," so the behavior you describe is not expected.  The first formula you described should also work if @DROPID is exactly "SF215FMT-05".  Have you tried displaying @DROPID in your form and making sure it has the values you think it does?

     One other thing you might try is displaying the d:ROUTELOG fields in a repeating table or section (if you're not already), and adding two expression boxes with the formulas @DROPID = "SF215FMT-05" and contains(@DROPID, "SF215FMT-05") to see where the formulas are true and where they are false.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.