Math - Contrain 2 fields to equal a value - InfoPath Dev
in

InfoPath Dev

Math - Contrain 2 fields to equal a value

Last post 10-28-2011 02:45 PM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-28-2011 02:12 PM

    • mrmapi
    • Not Ranked
    • Joined on 08-11-2011
    • Posts 7

    Math - Contrain 2 fields to equal a value

    I have 3 felds.  Field1 and Field2 contain numbers.  Field3 is the result where the formula needs to be placed.  When Field1 = 1 AND when Field2 = 2 I want to display a value of 1 in Field3 (or a value of true as example)  The formula i tried to come up with is:

     substring("1", 1, (((Field1 = 1) + Field2 = 2) = 3))

    I problem is that I end up with only able to constrain one of the fields but not both.  This is needed because another arument using the same field2 conflicts with this when it is not working properly.

     

    Any help is much appreciated.

     

    Thanks,

    Jason 

     

  • 10-28-2011 02:45 PM In reply to

    Re: Math - Contrain 2 fields to equal a value

    It looks like you want:

    substring("1", 1, (Field1 = 1) and (Field2 = 2))

    I assume you want the result to be blank when it doesn't pass those conditions?  If you want Field3 to be 1 when the condition is true and 0 when it's false, this should work as the formula:

    number((Field1 = 1) and (Field2 = 2))

    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.