例如,假设我有三个列表
我得用一些数据来填写我的名单。
对于季度列表,我需要在某种程度上与地区建立关系,因为如果我有两个季度的城市名称相同的城市,但不同的地区,它显示我对两个城市相同的季度(因为我需要一个过滤器的第三关系列的代码与地区在季度名单中)。
这能用下面的代码和SPServices库来实现吗?如果没有,我怎么做呢?
我的代码运行良好,但我需要额外的过滤。谢谢
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/0.6.2/jquery.SPServices-0.6.2.min.js" type="text/javascript"></script>var myJQ = jQuery.noConflict(true);
myJQ(document).ready(function() {
myJQ().SPServices.SPCascadeDropdowns({
relationshipList: "City",
relationshipListParentColumn: "Disctrict",
relationshipListChildColumn: "Title",
parentColumn: "Dictrict",
childColumn: "City",
promptText: "Select city",
debug: true
});
myJQ().SPServices.SPCascadeDropdowns({
relationshipList: "Quarter",
relationshipListParentColumn: "City",
relationshipListChildColumn: "Title",
parentColumn: "City",
childColumn: "Quarter",
promptText: "Select quarter",
debug: true
// options
});
});发布于 2019-11-08 09:10:37
您必须在季度列表和地区列表之间建立关系:
在季度列表中,您需要创建一个查找列分区(查找地区列表的标题列)。
然后将以下内容添加到代码中:
myJQ().SPServices.SPCascadeDropdowns({
relationshipList: "Quarter",
relationshipListParentColumn: "Disctrict",
relationshipListChildColumn: "Title",
parentColumn: "District",
childColumn: "City",
debug: true
});https://stackoverflow.com/questions/58749807
复制相似问题