Hi. I have a series of questions, and I want to save the questions along
with the answers. I don't want to create a new element name for each
question. I want the report xml to look something like:
<test>
<question>How many?</question>
<answer>3</answer>
</test>
<test>
...
</test>
...
It looks like the only way to have multiple test elements is to use a
repeating section. But with a repeating section, how do you prefill the
questions independently of each other? I would prefer not to use an external
data source to hold the questions, if possible. I feel like I'm missing
something very simple. Has this issue come up for others?
You didn't necessarily miss anything. The feature is there, but VERY hidden. Here's how to do it.
Go to Tools | Edit Default Values.
In the Edit Default Values dialog box, locate the 'test' node.
Right-click 'test' and choose 'Add another test below'.
Repeat this until you have the number of test nodes you want.
Then go back and select each question node and fill in a default value for it.

Signature
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPathDev ( http://www.InfoPathDev.com )
bryan - 12 Aug 2006 01:47 GMT
Thanks so much, Greg. Exactly what I was looking for!
> You didn't necessarily miss anything. The feature is there, but VERY hidden. Here's how to do it.
>
[quoted text clipped - 3 lines]
> Repeat this until you have the number of test nodes you want.
> Then go back and select each question node and fill in a default value for it.
Greg Collins [InfoPath MVP] - 13 Aug 2006 00:37 GMT
Glad I could help!

Signature
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPathDev ( http://www.InfoPathDev.com )