Sum Columns

S

Steve 2008 22

I am creating a repeating table in my form. I have 2 main fields one called
'unit price' and the another called 'quantity'. I have created a expression
box in the table which multiples the quantity by the price to give me a total
price for each line added. I am wanting to add a further box which will sum
up all of the total prices. However I have done everthing I know and it wont
allow me to do this as it does not recognise the expression box as a field. I
know it is possible because microsoft have a template with a similar table.
Are there any experts out there who can help me resolve this problem.

Thanks
 
C

Clay Fox

Hey Steve.

You would not be able to use the sum field since it is an expression and not
a field.

Since your quantity and price vary per line you can not sum each and multiply.

The only way I coudl see it working is if you only had a set number of rows
each time and you could manually calculate it but this is probably not
realistic.

I would add a total field to your repeating table.
You can have an expression that references a field so just because it is an
expression box it does not mean there is not a field. Otherwise design the
MS template and see how they do it.

Another possible option would be to have a running total field. So as each
line was totaled it would add the new amount to the running total. That
could work if they would not be deleting rows.

--
Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com
 

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