views:

328

answers:

4

I have a series of questions which are pulled from a SharePoint list and loaded into a repeating section. The section has three elements, the Question # (from SharePoint), and Question itself (from SharePoint), and a drop down box Yes/No (NOT from SharePoint)...

The repeating group portion works just fine, it is pulling all Question # and Questions from the SharePoint site, but I cannot bind the drop down box (yes/no) to any sort of local data source in order to record the information.

Essentially what I have is a dynamically generated form which pulls questions off a SharePoint and a user will answer Yes or No for each question. I cannot associate the Yes/No drop down with anything because it resides within a Repeating section...

Thanks for any help!

A: 

I think the problem is that you are basing your main datasource on the sharepoint data. As soon as you base your Main Datasource on a webservice (Sharepoint or self-built) then it cannot be modified without modifing the webervice.

There are a couple of ways that you could go about achieving your desired result.

  1. Create a webservice that retrieves the data from Sharepoint and then serves up a pre populated form.
  2. Add a secondary datasource (Retrieve) to the form and then add the data to the repeating section with code.
Nathan Fisher
Just so I understand what you said, I am not trying to modify what is on SharePoint in any way, I just want to pull the questions off the sharepoint site, display them dynamically, and have the user able to answer YES or NO to the question. Later, I want to be able to submit the form to another library and have the question # become a column and their answer become the item in that column for that row.
0x808080
In Infopath there is a Main datasource and secondary datasources. the Main datasource is what gets saved/submitted to the datastore (xmlfile/sharepoint/database/webservice). Secondary datasources are there generally for lookups/reference data. so the challenge is to somehow merge the two. Your main data source will be based on the format of the where you want to submit the Question# and Answer data, not on the sharepoint list which is used as reference data. Hope that helps clarify what I was saying.
Nathan Fisher
I do understand that, the list that I am pulling the question information from will be sepperate from where the forms are submitted. I think the only way to do what I want to do is to pull the information off the SharePoint programmatically and step through each row building each question and inserting a field for the user to answer the question.Do you know of any good infopath code resources?
0x808080
have a look at http://www.infopathdev.com and http://www.bizsupportonline.net/ They have been helpfull to me.
Nathan Fisher
A: 

You can add rule triggering submit connection at yes/no dropdowms.

A: 

The way I achieved this is as follows:

I did not use the wizard to handle all of the data binding.

I created the repeating group, with all the fields that I wanted to appear in each iteration of that group.

From there I wrote code to populate that repeating group with information that I got from various SharePoint sources. (e.g. Question #, Question Body)

When it came time to populate the "answer" control that a user can interract with I simply shoved a 0 in there for the value.

At the end, when I submitted, I traversed through the repeating group and constructed a CAML document based on the answers.

From there, I shot the answers to a SharePoint list, and shoved the form up on a SharePoint library.

The links Nathan shared with me might not outline this in full detail, but were very helpful!

0x808080
A: 

Can you please help me understand this process step by step, I have an infopath form that has various repeatable sections within which I have fields, when i list them I get only the 1st default field as field (first), I am not able to get to the fields that showed up as a result of users selecting repeat and filling in the field(second) etc. I want to be able to list all the fields as a sharepoint list, how do I do this please.

JVin