How to change the operation in a formula based on a field selection - InfoPath Dev
in

InfoPath Dev

How to change the operation in a formula based on a field selection

Last post 07-31-2013 08:09 PM by donstephen. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-30-2013 01:46 PM

    • Joe920
    • Not Ranked
    • Joined on 07-30-2013
    • Posts 2

    How to change the operation in a formula based on a field selection

    I started out with a simple formula to add to fields in my InfoPath form;

    (CurrentDriveCapacity) + (CapacitytoAdd)

    How can I change the operation of adding the two fields to subtracting one from the other based on a setting of another field?
  • 07-31-2013 08:09 PM In reply to

    Re: How to change the operation in a formula based on a field selection

    Hi Joe920,

    One solution I can think of is by creating two hidden fields with different operations that runs and sets another field to show a result if a certain condition has been met.

    Example:

    field A + field B = field E

    field C contains the formula A + B
    field D contains the formula A - B

    Rule 1:
    Condition: if field B > X
    Action: Set field E to the value of C.

    Rule 2:
    Condition: if field B < X
    Action: Set field E to the value of D.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.