简体   繁体   English

SharePoint SPServices自动完成功能不适用于列

[英]SharePoint SPServices autocomplete not working for a column

I have a working jQuery SPServices code for a column Description in a list. 我有一个工作的jQuery SPServices代码,用于列表中的列Description The problem is, that when I try to get the data from another column, Project Item , with the same code, nothing happens. 问题是,当我尝试使用相同的代码从另一列Project Item中获取数据时,什么也没发生。 Also, when I try to put the code for the both columns, the code does not work for any. 另外,当我尝试将代码放在这两列中时,该代码对任何代码均无效。 Both columns are of Single line of text type. 两列都是单行文本类型。 The code is following: 代码如下:

<script language="javascript" type="text/javascript" src="/SiteAssets/Scripts/jquery-1.8.3.min.js"></script>
<script language="javascript" type="text/javascript" src="/SiteAssets/Scripts/jquery.SPServices-0.7.2.min.js"></script>
<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        document.getElementById('ctl00_m_g_b3f08547_27a4_484c_938a_f92864c47b7a_SPTextSlicerValueTextControl').title = 'Test';

        $().SPServices.SPAutocomplete({ 
            sourceList: "Projects",
            sourceColumn: "Project Item",
            columnName: "Test",
            ignoreCase: true,
            numChars: 2,
            slideDownSpeed: 50,
            debug: true
        });
    });
</script>

Check the docs for the autocomplete function. 检查文档中的自动完成功能。 The sourceColumn name needs to be the StaticName for the column, which in this case is likely to be Project_x0020_Item. sourceColumn名称必须是该列的StaticName,在这种情况下,它可能是Project_x0020_Item。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM