NaN problem - InfoPath Dev
in

InfoPath Dev

NaN problem

Last post 08-22-2008 04:25 PM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-27-2005 09:54 AM

    • drobins
    • Top 500 Contributor
    • Joined on 08-17-2005
    • Canada
    • Posts 47

    NaN problem

    I am trying to set the value of text box using a formula.

    It calculates the the percentage increase for an employees salary.

    The problem is before the old salary and new salary are entered the percentage box displays NaN.

    All three boxes are decimal.

    I would prefer the percentage box stay blank until numbers are entered.

    any ideas. i'm sure it's something simple that i am over looking
  • 09-27-2005 10:59 AM In reply to

    What if you defaulted the three textboxes to the value 0? I know it would not be blank when the from comes up but it should get rid of the issue. I experienced similar issues with working with .NET Winforms.
    Jason
    http://www.k2distillery.com/
  • 01-31-2006 11:37 AM In reply to

    I was just working on the same thing, and here is what worked for me. Set a rule on the field that shows NaN. First, set a rule condition for if "the field contains NaN", then set the rule itself to set the field to blank. My result is a blank field until I have put in the numbers that will be calculated.



    Hilary
  • 08-20-2008 09:03 PM In reply to

    This problem is driving me crazy! The solution mentioned above is not working. I don't care about the cosmetic reasons, I am trying to submit to a SQL database and NaN is not acceptable! Any other ideas would be greatly appreciated.

  • 08-22-2008 04:25 PM In reply to

    Hey there --

    A lot depends upon how you are getting the error. Is it a default value in your field? Can you have the field populated via a rule instead? Then you'd be able to set a condition on the rule so it would only fire when you have values you can use (like "FieldA is not blank") for calculations. Another option is to use a conditional default value. This post has two methods for this, I find the second one the most helpful.

    Hilary Stoupa

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