展开查找列 [英] Expand lookup column

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

问题描述

我想知道是否有一种方法可以以新的形式扩展查阅列,以便我可以完全看到自己的选择.  我所选择的价值观很长.  另一个问题是,给定的行上有2列.  

I was wondering if there was a way to expand the lookup column in a new form so I can fully see my choices.  The values of my choices are kind of long.  The other issues is that there are 2 columns on a given line.  

谢谢

丹尼

推荐答案

您可以使用SharePoint Designer自定义列表.

You can customize your list using SharePoint Designer. 

创建一个自定义新表单.默认情况下,您在SP列表中的字段应该可见.然后,在您具有查找列的位置添加按钮.在弹出对话框窗口中单击显示选择"(显示查找列表).

Create a custom new form. By default your fields in SP list should be visible. Then, add a button where you have the lookup column. On click show the choices(show the lookup list) in the popup dialog window. 

这将解决存在更多选择以及终端用户可以搜索值的问题,因为列表已在SP 2013版本中构建.

This will resolve the issue of having more choices as well as end user can search for the values since list has search built in SP 2013 version.

一旦选择了该值,则需要捕获该值并将其存储在一个字段中(该字段可能是不可编辑的文本字段,以便始终从显示查找的弹出窗口中选择这些值).

Once the value is selected, you need to capture and store the value in a field (may be a non editable text field so that the values are always selected from popup window which shows lookup).

参考代码:

//Function show lookup list in a popup window
function openPopupWindow() {
    var options = SP.UI.


create_DialogOptions(); options.title =搜索查找值"; options.url ='../../Lists/ListName/AllItems.aspx'; options.width = 600; options.height = 490; options.allowMaximize = false; options.dialogReturnValueCallback = OnPopClosed; SP.UI.ModalDialog.showModalDialog(options); } //从弹出窗口设置选定值的功能 函数OnPopClosed(dialogResult,returnValue) { 如果(dialogResult == SP.UI.DialogResult.OK& returnValue){ //alert(returnValue); SetValues(returnValue); } 别的 { //alert('Test'); } } //从弹出窗口设置选定值的功能 函数SetValues(details){ var selectedValue =详细信息; 如果(selectedValue.length< = 0){ //没做什么 } 别的 { //将选定的值设置到文本字段; } }
create_DialogOptions(); options.title = "Search Lookup Values"; options.url = '../../Lists/ListName/AllItems.aspx'; options.width = 600; options.height = 490; options.allowMaximize = false; options.dialogReturnValueCallback = OnPopClosed; SP.UI.ModalDialog.showModalDialog(options); } //Function to set the selected value from popup window function OnPopClosed(dialogResult, returnValue) { if (dialogResult == SP.UI.DialogResult.OK && returnValue) { //alert(returnValue); SetValues(returnValue); } else { // alert('Test'); } } //Function to set the selected value from popup window function SetValues(details) { var selectedValue = details; if (selectedValue.length <= 0) { //Do Nothing } else { //Set the selected value to the text field; } }

这有点棘手,但这将是一个很好的解决方案.希望对您有帮助!

This is little tricky but it will be a good solution. I hope this helps you!


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

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