InfoPath 2007 下拉列表从 MOSS07 列表填充,但不按字母顺序排列

发布于 2024-07-29 19:42:19 字数 219 浏览 2 评论 0原文

我们有一个 InfoPath 2007 表单,用于填充 SharePoint 2007 员工列表中的下拉列表。 但是,当在浏览器中打开表单时(就像它的设计目的一样),它不会按字母顺序排列下拉列表。 但如果我在电脑上打开表格,它就会出现。

还有其他人遇到过这个问题并有解决方案吗?

我想知道它是否与列表的索引有关,如果在浏览器中打开,如果它按分配的 ID 号排序,在计算机上则按值排序。

We have an InfoPath 2007 form that populates a drop down from a SharePoint 2007 list of Employees. However, when opening the form in the browser (like it is designed to do) it does not alphabetize the drop down. But if i open the form on my computer, it does.

Anyone else come across this issue and have a solution to it?

I am wondering if it has to do with the indexing of the list, where if opened in the browser, if it sorts by the ID number that is assigned, where when on the computer it sorts by value.

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

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

发布评论

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

评论(2

窗影残 2024-08-05 19:42:19

不要将列表添加为数据源,而是将列表的数据视图 XML 添加为数据源。

您可以使用以下 URL 找到列表的数据视图 XML:

<Site URL>/_vti_bin/owssvr.dll?Cmd=Display&List={<GUID of the List>}&XMLDATA=TRUE&SortField=<Internal name of the Field that you want to Sort>&SortDir=Asc

使用此 XML 文件作为 InfoPath 表单中的数据源,下拉列表将根据您指定的字段进行排序。

Instead of adding the List as a Data Source, add the Data View XML of the list as the data source.

You can locate the Data View XML of the list by using this URL:

<Site URL>/_vti_bin/owssvr.dll?Cmd=Display&List={<GUID of the List>}&XMLDATA=TRUE&SortField=<Internal name of the Field that you want to Sort>&SortDir=Asc

Use this XML file as the data source in your InfoPath form, the dropdowns will be sorted according to the field you have specified.

┼── 2024-08-05 19:42:19

看起来支持浏览器的表单模板不支持基于视图的排序,因为它需要手动编辑视图 XSL 文件 参考

您拥有的选项是

  1. 手动编辑 xsl
  2. 在加载事件上编写自定义代码并对其进行排序

有关更多技巧,请参阅此参考 msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/4f739cec-220e-4ab2-a6d9-13079e43844a" rel="nofollow noreferrer">链接

一个像魅力一样工作的好例子是< a href="http://blogs.msdn.com/infopath/archive/2007/01/15/populate-form-data-from-sharepoint-list-views.aspx" rel="nofollow noreferrer">此处

Looks like View-based sorting is not supported in browser-enabled form templates because it requires manual hand editing of the view XSL file Refer

Options you have are

  1. Hand edit the xsl
  2. Write custom code on the load event and sort it

For more tricks refer to this link

One good example that works like charm is here

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