如何将现有字段信息添加到新添加的infoPath文本框中?
当我向表单添加字段时,如何根据旧字段在 InfoPath 表单中预填充新字段。
在我的 InfoPath 表单中,我有一个名为“Description”的字段名称。现在我添加了另一个名为:“SummaryDescription”的字段。假设从“描述”字段中获取前 10 个单词。
即使我添加了字段和逻辑,SharePoint 数据库中的现有表单数据也不会被修改。
编辑
@PatrickPitre
非常感谢您的快速回复。
我正在处理基于 Web 的 InfoPath 表单(表单服务)。是的,我的计算机上安装了 Visual Studio 2008。
我需要做的一件事是修改现有的基于 Web 的 InfoPath 表单,即在旧表单的基础上再添加三个字段。添加字段后,我需要确保当用户单击 Sharepoint 中已有的现有表单时,这些新添加的字段不为空。我必须将现有字段中的前 200 个单词称为“Description”,并将其插入新字段“SummaryDescription”中。
到目前为止我所做的事情:
我将这三个新字段添加到基于 Web 的 InfoPath 表单中,并将其发布到一个测试服务器中。我可以在现有表单中查看新添加的字段。
我正在尝试使用 InfoPath 中的规则来帮助我实现我需要做的事情。我检查新添加的字段是否为空。如果是,则获取“SummaryDescription”中的字段并添加 的值。
这是代码:
concat(
substring((string-length(Description)), 1, ((string-length(Description)) <= 200) * (string-length(Description))),
substring(number(201), 1, (not(string-length(Description))) * number(201))
)
但是我根本无法将值添加到该字段。
这是我所做的屏幕截图。
我尝试了很多不同的方法。我很确定“SummaryDescription”为空,但我无法获取要显示的值
“Sharepoint Database”是什么意思?我认为基于 Web 的 InfoPath 表单中的所有内容都存储在某种数据库中。如果我错了请纠正我。
非常感谢。
How to pre-fill new fields in a InfoPath form base on the old fields, when I add a fields to a form.
In my InfoPath form I have a field name called: "Description". Now I added another field called: "SummaryDescription". Which is suppose to take the first 10 words from the Description field.
Even though I added field and the logic, the existing form data in SharePoint Database does not get modified.
Edit
@PatrickPitre
Thank you very much for the quick response.
I'm dealing with a web-based InfoPath form (Forms Services). Yes I do have Visual Studio 2008 installed in my computer.
One of the things I need to do is to modify existing web-based InfoPath form, which is to add three more fields to the old one. Once I add the fields I need to make sure those newly added fields are not blank when the user click on the existing form that is already in the Sharepoint. I have to take the first 200 words in the existing field say "Description" and plug it into the new field "SummaryDescription".
What I have done so far:
I added those three new fields to the web-based InfoPath form and published into one the test server. I'm able to view the newly added fields in the existing form.
I'm trying to use the Rule in the InfoPath to help me achieve what I need to do. I check whether or not the newly added fields are blank or not. If it is then take the fields in "SummaryDescription" and add the value of .
This is the code:
concat(
substring((string-length(Description)), 1, ((string-length(Description)) <= 200) * (string-length(Description))),
substring(number(201), 1, (not(string-length(Description))) * number(201))
)
But I'm not able to add the value to the field at all.
This is the screen shot of what I did.
I have tried many different ways. And I'm pretty sure "SummaryDescription" is blank but I just could not get the value to display
What do I mean by "Sharepoint Database"? I thought that everything in the web-based InfoPath form is store in some kind of Database. Correct me if I'm wrong.
Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仅通过扩展 InfoPath 表单的架构和逻辑并不意味着任何预先存在的数据(填写的表单)都会自动升级。
您有多种选择:
主要区别在于,在第一种情况下,您可以进行批量升级,而在后一种情况下,则可以在打开现有表单时根据具体情况进行升级。
Just by extending the schema and logic of an InfoPath form doesn't mean any pre-existing data (filled forms) will be automagically upgraded.
You have several options
The principal difference is that in the first case you can make a batch upgrade, while in the latter case it's case-by-case on-demand upon opening an existing form.