summing results

M

M. Swartztrauber

Hello,

If I have several controls that create text in a text box based on
their entries, how can I make those text strings cumulate rather than
replace each other?

Thanks much
 
A

Andrew Watt [MVP - InfoPath]

Hello,

If I have several controls that create text in a text box based on
their entries, how can I make those text strings cumulate rather than
replace each other?

Thanks much

If you mean specifically "cumulate" then use the XPath sum() function.

You can do this on the default value of a text box or on an expression
box control. If you do this on a text box, remember to make it read
only.

Andrew Watt
MVP - InfoPath
 
M

M. Swartztrauber

I didn't mean for my perhaps inexact use of the term "cumulate" to
obfuscate.

I know how to enter into field 1 "red dog" and get in field 3 "Mary
likes red dogs" and put into field 2 "blue cat" and get in field 3
"Mary likes blue cats."
The problem is that they replace each other. I want to put "red dog"
into field 1 and "blue cat" into field 2 and get in field 3 "Mary
likes red dogs. Mary likes blue cats."

Does the xpath sum() function still apply?

Thanks
 
A

Andrew Watt [MVP - InfoPath]

You want something like

concat("Mary likes ", ../my:field1, ". ", "Mary likes ", ../my:field2,
".")

You would probably want to use conditional formatting to hide the form
control containing the concatenation until both field1 and field2 had
values in them.

Andrew Watt
MVP - InfoPath
 

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