InfoPath 使用来自 SharePoint 的数据和用户输入重复组

发布于 2024-08-26 18:39:42 字数 333 浏览 13 评论 0原文

我有一系列问题,这些问题是从 SharePoint 列表中提取并加载到重复部分中的。该部分包含三个元素,问题编号(来自 SharePoint)和问题本身(来自 SharePoint),以及一个下拉框是/否(不是来自 SharePoint)...

重复组部分工作正常,它正在拉动所有内容来自 SharePoint 网站的问题 # 和问题,但我无法将下拉框(是/否)绑定到任何类型的本地数据源以记录信息。

本质上,我拥有的是一个动态生成的表单,它从 SharePoint 中提取问题,用户将对每个问题回答“是”或“否”。我无法将“是/否”下拉菜单与任何内容关联起来,因为它位于重复部分中...

感谢您的帮助!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

姐不稀罕 2024-09-02 18:39:42

我认为问题在于您的主要数据源基于共享点数据。一旦您将主数据源基于 Web 服务(Sharepoint 或自建),那么在不修改 Web 服务的情况下就无法对其进行修改。

您可以通过多种方法来实现您想要的结果。

  1. 创建一个 Web 服务,从 Sharepoint 检索数据,然后提供预填充的表单。
  2. 将辅助数据源(检索)添加到表单,然后使用代码将数据添加到重复部分。

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.
旧情勿念 2024-09-02 18:39:42

您可以在是/否下拉列表中添加触发提交连接的规则。

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

梦明 2024-09-02 18:39:42

我实现此目的的方法如下:

我没有使用向导来处理所有数据绑定。

我创建了重复组,其中包含我希望出现在该组的每次迭代中的所有字段。

从那里我编写了代码,用我从各种 SharePoint 来源获得的信息填充该重复组。 (例如问题#、问题正文)

当需要填充用户可以与之交互的“答案”控件时,我只需在其中插入一个 0 作为值。

最后,当我提交时,我遍历了重复组并根据答案构建了一个 CAML 文档。

从那里,我将答案拍摄到 SharePoint 列表,并将表单推到 SharePoint 库中。

内森与我分享的链接可能没有详细概述这一点,但非常有帮助!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文