Thursday, January 26, 2012

'NaN' in InfoPath Decimal/ percentage field

In InfoPath 2007, we used to get NaN in our calculated decimal fields. So, I tried to add a Rule to check if the value is NaN and replace it is with '0' if it is true. However, there is no option to check if the value of a decimal field with a text NaN
NaN error in calculated decimal fields

So the workaround for this is, change the field type to text and add the rule as below. After creating the rule, again change the field type to Decimal.

NaN error in calculated decimal fields

1 comment:

  1. Great advice! This was very helpful and a nice "cheat" to replace NaN with a 0 in the conditional rule...Thanks!!

    ReplyDelete