calculations - problem!

M

Milena

Hi,
I am trying to use the results from one expresion box into the formula of another. Do you know why it isn't working? Thanks!
Example: expression box A has the formula field1*field2. Epression box B has the formula expression box A * field2. It doesn't work.

Thanks
 
T

TheCZ

I don't think what you want to do is possible.

An expression box only works with XPath formulas and pieces of dat
from
the form's data sources. Think of them as windows that you
look through to see the form's data source (sometimes
in a customized format, such as an expression box that
computes the total of many fields).

Since they are just controls and not pieces of data,
you cannot use the results of one expression box in the
formula of another expression box.

You should just change the formula for your second box to:

field1*field2*field2
*Hi,
I am trying to use the results from one expresion box into th
formula of another. Do you know why it isn't working? Thanks!
Example: expression box A has the formula field1*field2. Epressio
box B has the formula expression box A * field2. It doesn't work.

Thanks


-
TheC
 
J

Jerry Thomas [MSFT]

Expression boxes are not bound to a data node and therefore can't pass the
results along like you are trying to do.
Expression B needs to be (field1*field2) * field2 or
you can do the calculations in a text box and then Expression box B can be
SubTotalfield * field2

If you use the 2nd approach, the text box can be read only and actually
doesn't even have to be on the form at all! You can add the calculations to
the node in the Data Source view. This would be a good way to go if you use
this same interim calculation several times and don't want to re calc it
every time.

--
Jerry Thomas
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Milena said:
Hi,
I am trying to use the results from one expresion box into the formula of
another. Do you know why it isn't working? Thanks!
Example: expression box A has the formula field1*field2. Epression box B
has the formula expression box A * field2. It doesn't work.
 
M

Milena

Hi Jerry,

Thank you for your advice - but this option for doing calculations in a tetx box is nowhere to be found. Could you please help? Is there a chance that my software copy is not full or somehting?
 

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