使用InfoPath选择项目后隐藏SharePoint列表项 [英] Hide a SharePoint List item after selecting the item using InfoPath

查看:73
本文介绍了使用InfoPath选择项目后隐藏SharePoint列表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在研究利用通过InfoPath自定义的SharePoint列表的HelpDesk解决方案.

I am working on HelpDesk solution that utilize a SharePoint List customize with InfoPath.

这是InfoPath与两个不同的List的数据连接.

This is InfoPath has data connection with two different List.

我面临的主要挑战性问题是,此列表具有下拉菜单,用户可以在其中选择项目.

The main challenging issue I am facing is, this list has dropdown where a user select an Item.

用户选择此项目后,我想将其隐藏,以免其他用户看到该项目以避免重复.

After a user  selected this Item, I want to hide it so it wont be seen by another user to avoid duplications.

示例A.我在SharePoint列表中有以下项目,用户可以从下拉菜单TK101,TK102和TK103中选择以下项目.如果选择了TK101,则我想隐藏TK101,并且应该显示的唯一两个选项是TK102 和TK103的下拉菜单.

Example A. I have the following item in the SharePoint list where a user can select the following items from the dropdown TK101, TK102, and TK103. If TK101 is selected, I want to hide TK101 and the only two options should be displayed is TK102 and TK103 from the dropdown.

我希望这个例子能使之清楚.

I hope the example makes it clear.

谢谢

Abenet

推荐答案

嗨Abenet,

Hi Abenet,

以下代码供您参考,在下面的代码中,"listName"是我的列表名称,即"fieldDisplayName"是字段显示名称和"fieldInternalName";是字段内部名称.请对其进行修改以使其起作用.添加 代码到新建/修改表单页面.

The following code for your reference, in the code below, the "listName" is my list name, the "fieldDisplayName" is field display name and "fieldInternalName" is field internal name. please modify it to make is works. Add the code to new/edit form page.

<script src="//code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
var myVar;


(function(){ setInterval(initSelect,300); }); 函数initSelect(){ var listName ="InfoPathList02"; var fieldDisplayName ="Dropdown1"; var fieldInternalName =" field1; var
(function(){ setInterval(initSelect, 300); }); function initSelect(){ var listName="InfoPathList02"; var fieldDisplayName="Dropdown1"; var fieldInternalName="field1"; var


selectOptions =
selectOptions=


这篇关于使用InfoPath选择项目后隐藏SharePoint列表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆