I am trying to add a calculation to one of my fields in InfoPath, I know how to do this in Excel, but I can't quite figure it out in InfoPath.

This is how I would express the formula in excel:

=IF(A1*A2=0, 0, A1*A2)

So cell A1 x cell A2, if A2 is 0 then display A1


There is no IF conditional formula in Infopath you have to use rules

  • Go to field1 -> right click -> Rules
  • Create a rule -> New "Action"
  • Condition "number(field1) * number(field2) = 0"
  • Run these Actions "Set Field Value"
  • Select "field3" and set value 0
  • Repeat above steps for field 2
  • field 3 default value "number(field1)*number(field2)"

We were applied these steps in case of conditional value.

| improve this answer | |

Can use "Rules" to set value to field.

Ex: https://support.office.com/en-us/article/Introduction-to-rules-f00de016-7b2d-4ef8-b168-26b7748c22a1

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.