Expression box formula help - InfoPath Dev
in

InfoPath Dev

Expression box formula help

Last post 05-19-2010 02:56 PM by bryanstrader. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-17-2010 12:46 PM

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

    Expression box formula help

    Hello Everyone!

    Simple question here that I cant seem to figure out.

    I am designing a quiry form via SQL that will count how many barcode scans where made during a particular mail run.

    The expression box formula below will only count PICK-UP & DROP-OFF barcode scans that are conducted during the 8:30AM RUN and will filter out the START and END scan. The formula will then divide by 14 to give a 100% compliance if 14 scans where made. The formula is as follows:

    count(@DROPID[(not(contains(., "START")) and not(contains(., "END"))) and (contains(@RECVRMROUT, "8:30AM RUN") and contains(@RLOGTYPE, "DROP-OFF") or contains(@RLOGTYPE, "PICK-UP"))]) / 14

    The issue I am having is if the messenger scans the same barcode twice and misses another barcode it will still show as 14 scans.

    How do i go about the following:

    • Count only unique scans and not repeats
    • Only show 100% value when 14 or more scans during that run is made and not 150% if 21 scans where made.

    I am using IP 2003.

    Thank you!

  • 05-19-2010 12:21 PM In reply to

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

    Re: Expression box formula help

    Anyone?

  • 05-19-2010 02:56 PM In reply to

    Re: Expression box formula help

    It looks like you maybe trying to accomplish a bit much within an expression box (not that I'm not guilty of doing similar :)), I would maybe try to narrow to unique scans from within the SQL that retrieves the data in the data connection. That would at least eliminate the one scan being missed, but another being done twice. I am wishing Microsoft would extend the expression capabilities with If and IIF statements that would make these types of scenarios easier to put together. Sorry I couldn't be of more help...
    Bryan Strader
    Software Developer
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.