help with calculating Amount

G

Greg Burns

I have a Repeating Table with columns Quantity, Price and Amount. In the
footer of the table is a Total Amount. All are have datatype of
decimal(double) and everything totals correctly. This works great. But my
user would like the ability to, at times, type text into the Price fields
(for example. NC - No Charge,et al). If I change the Price field to text
and the user types NC in the box, the Amount field and the total Amount
field becomes NaN (Not-A-Number). Is there a way to have the amount field
be blank for the row were the price is set to text. And the Total Amount
just skip that row?

TIA,
Greg
 
G

Greg Burns

I just installed InfoPath 2003 Toolkit for VS.NET Preview and opened my form
with it. Now I'm lost. :) I am comfortable programming in VB.NET
winforms/webforms but this is a first with IP. Can anybody point me to a
walkthrough or something to go over the basics?

Thanks

If you use an OnAfterChange event handler to set the value via code you can
do this.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



I have a Repeating Table with columns Quantity, Price and Amount. In the
footer of the table is a Total Amount. All are have datatype of
decimal(double) and everything totals correctly. This works great. But my
user would like the ability to, at times, type text into the Price fields
(for example. NC - No Charge,et al). If I change the Price field to text
and the user types NC in the box, the Amount field and the total Amount
field becomes NaN (Not-A-Number). Is there a way to have the amount field
be blank for the row were the price is set to text. And the Total Amount
just skip that row?

TIA,
Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top