Hi
I am creating a form that has two textboxes. One is for kW (kiloWatt) and the other is for HP (HorsePower). The form is a IP2007 form running under forms Services on SP2007.
There is a rule for conversion between the two:
HP = kW / 0.7355
and hence kW = HP * 0.7355
Problem is that I need users to be able to enter the number they have and calculate the other. So I have entered a rule on kW: HP = round(kW / 0.7355) and I have entered a rule on HP: kW = round(HP * 0.7355)
This almost always goes well, but there are situations where it doesn't go well.
If I enter a kW, InfoPath seems to be doing this:
1. Calculate HP as round(kW / 0.7355)
2. Since HP has changed, calculate kW as round(HP * 0.7355)
Luckily IP knows to stop now and not keep going endlessly.
Problem is, if I enter HP=1000, then after calculating kW and then recalculating HP, HP is set to 1001. This won't do for me at all - but I don't really know what to do. I can't just save the value with decimals and show the value with no decimals - I need the actual values that are saved in the Main DataSource to have no decimals because of later purposes.
Any ideas?
Thanks.
eliasen, representing himself and not the company he works for.
Microsoft BizTalk MVP
Blog: http://blogs.eliasen.dk/technical/