Repeating section question

O

okaminer

hi
I am designing a form in which I would like to create a repeating
section that have constant number of instances

For example:
if I have a survey form that has a column of fixed questions, followed
by a column for the user to fill out with answers, and 20 fixed rows
corresponding to 20 questions. How do you design an Infopath form and
its corresponding data source with a fixed repeating table? An example
appears below:

[Question] [Response 1(bad)-5(good)]
How is the food: 3
How is the weather: 1
How do you feel 5
....
 
A

Adam Harding

Instead of doing a repeating table insert a repeating section from the same
datasource and then add in a twenty column table. If THIS table needs to be
repeating it can be but it sounds like you don't need it to be.

So delete your table. Click on the datasource you want, click the drop down
arrow to the right, select 'Repeating Section' then place the fixed table
into the repeating area of the repeating section, creating an inifinitely
repeatable set of 20 questions and 20 answers.

Will that do?
 
O

okaminer

Thanks for replying
But I still didn't understand,
How to create 20 rows in the fix table that will be bound to the same
datasource (survey) all this in Design Time.

I have created the repeating sections with controls but I didn't
manager to add more sections during the design time. (only durnig run
time)


Just to make things clear I want the users to the the form that already
have 20 questions in side and they only need to fill in the answers.
 
V

virgul

Hi,

Why you don't create a fix table with twenty instead of a repetitive
section the result (your XML) is more useful:

you have one field for food^, weather ,...

if you use repetitive section your xml is

<toto>
<albert>1</albert>
<albert>4</albert>
<albert>5</albert>
<albert>3</albert>
</toto>

if you use fix table:

<toto>
<food>1</food>
<weather>3</weather>...
....

It's more easy the reuse after if you use repetitive table you have to
use position().

But it's your choice

++

Thierry
 
A

Adam Harding

Create a repeating section from your repeating source by clicking the
dropdown arrow and selecting repeating section.

Click inside the 'field' part of the repeating section. Shown as a field as
long as the section. Then go to the 'Layout' part of the 'design tasks'
pane. Select custom table specify as many rows and columns as you want and
select OK. THEN populate the fixed 20 column table with the fields you want
in the way you want and when you have finished you will have a fixed 20
column table that can repeat infinitely.

Is this more clear, or do i need to try again.
 
O

okaminer

Thanks for replying
but still the problem was adding 20 rows (fixed number) during the
desing time, not columns. In order to add columns I can simply add the
repeating table, but then again I can't set the data in the rows during
the design time, becuase infoPath let you create only one row when
desiging the form.

Thanks again for the help
 
Top