Sharepoint现有列的Jquery UI [英] Jquery UI for Sharepoint Existing Column

查看:107
本文介绍了Sharepoint现有列的Jquery UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SharePoint日历中有一个查找列,我正在尝试将其创建为 自动完成功能,因此我可以在查找中进行搜索并让其查询或缩小搜索范围。 日历中的查阅列(Store Number LookUp)基于列表(Store Lookup)中的
列(商店),该列是计算列,组合了列表中的多个列(Store Lookup)。   我可以使用哪些代码来完成? 显然SPServices.AutoComplete不适用于计算列,因为我有
试过这个。 我也尝试过使用selected.js,这也没用。 感谢您提供的任何代码。  

I have a lookup column in a SharePoint Calendar that I'm trying to make into an  AutoComplete, so i can search in the lookup and have it query or narrow down the search.  The lookup column in the calendar (Store Number LookUp) is based off a column(Stores) in a list(Store Lookup) that is a calculated column, combining several columns from the list(Store Lookup).   What code can I use to accomplish?  Apparently SPServices.AutoComplete doesn't work with calculated columns, as i have tried this.  I have also tried using chosen.js, which didn't work either.  Thanks for any code to make work.  

推荐答案

嗨Brian,

Hi Brian,

因此,基于您的描述,我做了以下示例:

So based on your description, I did the following example:

1。创建一个名为"Store Lookup"的列表,计算列存储,结合数字和标题:

1. Create a list named "Store Lookup", calculated column Stores, combining Number and Title:

2。创建名为"Store Number LookUp"的单行文本字段。在日历中:

2. Create a single line text field named "Store Number LookUp" in the Calendar:

3。添加Jquery AutoComplete代码段,如下所示,使用Rest API获取计算列数组并分配给Store Number LookUp输入框以获取自动完成功能:

3. Add the Jquery AutoComplete code snippet as below, using Rest API to get calculated column array and assign to Store Number LookUp inputbox for autocomplete:

<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript" src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

<script type="text/javascript">


(document).ready(function(){
console.log( "on ready ready";
AutoPopulateEmployee();
});
函数AutoPopulateEmployee(){
(document).ready(function () { console.log("on document ready"); AutoPopulateEmployee(); }); function AutoPopulateEmployee() {


(" input [title ='Store Number LookUp']")。autocomplete({
source:function(request,request,响应){
("input[title='Store Number LookUp']").autocomplete({ source: function( request, response ) {


这篇关于Sharepoint现有列的Jquery UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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