How do I compare 2 fields (gretaer then) as numbers - InfoPath Dev
in

InfoPath Dev

How do I compare 2 fields (gretaer then) as numbers

Last post 12-02-2012 11:39 PM by daniweb. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-02-2012 03:26 AM

    How do I compare 2 fields (gretaer then) as numbers

     Hi All,

    I have 2 text-boxes(actually they are 2 drop-downs from that are being filled from lists, but it doesn't matter).

    After I click a button, I want to compare these 2 text-boxes but a number comparison not a string-compare.

    when I click the button, add a rule I can compare these text-boxes but the result is a string compare, even when I click the expression I see that it is:

    msxsl:decimal-compare(dfs:dataFields/my:SharePointListItem_RW/my:FirstValue, dfs:dataFields/my:SharePointListItem_RW/my:SecondValue) >= 0

  • 12-02-2012 08:04 PM In reply to

    Re: How do I compare 2 fields (gretaer then) as numbers

    You should be able to do this:

    number(dfs:dataFields/my:SharePointListItem_RW/my:FirstValue) > number(dfs:dataFields/my:SharePointListItem_RW/my:SecondValue)

    But have you experienced any issue with the msxsl:decimal-compare? I would expect it to work as you need it to.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-02-2012 11:39 PM In reply to

    Re: How do I compare 2 fields (gretaer then) as numbers

     You rock!

    your solution works. when I'm applying the decimal-compare - it gives me an error when clicking on the button: "some rules were not applied, unspecified error" .

    10x a lot.

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.