开发者

InfoPath Repeating Group with Data from SharePoint and User Input

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 question开发者_如何学JAVAs 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!


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.


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


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜