在SPDesigner 2013中以另一个列表形式显示列表列值 [英] Show List column value in another List form in SPDesigner 2013
问题描述
我正在为列表设计一个编辑表单,在该表单中,我需要根据表单中的列值在文本框中显示另一个列表值.
I am designing an edit form for my list in which I need to display another list value in a textbox based on a column value in the form.
例如:在列表中-列表A"我有GID列,类型.在列表B"中,我有2列GID,TypeValue.现在,我想显示列表B"中的值在列表中GID相等的编辑表单中.
Eg: In the list - "List A" I have columns GID, Type. In "List B" I have 2 columns GID, TypeValue. Now I want to show Value from "List B" in the List A edit form where GID is equal.
列表B可以针对同一GID有多行,我想根据列表A中的类型"对其进行过滤.
List B can have multiple rows for same GID, I want to filter it based on 'Type' in List A.
该怎么做?
推荐答案
基于我的理解,您想基于G查询TypeValue值 ID>类型.它就像多个级联一样工作:GID>类型> TypeValue.
我们需要使用查找列来建立实现此目的的关系.
1.在listA列表中,将所有GID值存储在列表的GID列中.
2.在listB列表中,将Type值存储在GType列中. GID列是listA列表的GID列中的查找"列.
3.在ListC列表中,存储TypeValue值. GType列是listB列表的GType列中的Lookup列.
4.创建一个新列表并创建以下查找列.
4. Create a new list and create the following lookup columns.
(1)GID列是列表的GID列中的查阅列.
(2)GType列是listB列表的GType列的查阅列.
(3)GTypeValue列是ListC列表的GTypeValue列的查阅列.
5.编辑表单页面,在页面上添加脚本编辑器Web部件,然后将代码粘贴到下面.
<script src="https://code.jquery.com/jquery-1.10.2.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices-2014.02.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
(document).ready(function(){
(document).ready(function() {
().SPServices.SPCascadeDropdowns({ lationshipList:"listB", lationshipListParentColumn:"GID", lationshipListChildColumn:"GType", parentColumn:"GID", childColumn:"GType", 调试:true });
().SPServices.SPCascadeDropdowns({ relationshipList: "listB", relationshipListParentColumn: "GID", relationshipListChildColumn: "GType", parentColumn: "GID", childColumn: "GType", debug: true });
这篇关于在SPDesigner 2013中以另一个列表形式显示列表列值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!