需要语法手动向(新建,编辑,显示)表单添加选项。 [英] Need Syntax to add choices to (New, Edit, Display) forms manually..

查看:48
本文介绍了需要语法手动向(新建,编辑,显示)表单添加选项。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试手动编辑与外部内容类型列表关联的(新建,编辑,显示)表单。 我可以编辑字段名称,做基本化妆品等。 但我需要的是采用标准文本字段并使其使用选项(例如A,B,C)
。 使用Native SharePoint列表,您可以使用设计器在几秒钟内创建选项。 但是因为我使用的是绑定到SQL表的外部列表,所以SharePoint只将文本字段视为文本字段,并且没有意识到这些
需要从下拉列表中选择字段。 所以我现在必须将其硬编码到表格中: 这样做的语法是什么? 如果有人能给我一个例子,这对我有帮助。



作为一个例子。 这是标准文本字段的代码语法:


< td width =" 400px" VALIGN = QUOT;顶" class =" ms-formbody">

< SharePoint:FormField runat =" server" ID = QUOT; FF1 {$名次}" ControlMode = QUOT;最新及QUOT;字段名= QUOT;标题" __designer:绑定= QUOT; {DDWRT:的DataBind( 'I',的concat( 'FF1',$ POS), '值', '的ValueChanged', 'ID',DDWRT:EscapeDelims(串(@ID)),'@标题')}" />

< SharePoint:FieldDescription runat =" server" ID = QUOT; ff1description {$名次}"字段名= QUOT;标题" ControlMode =" New" />

< / td>


所以我只需要知道如何在drop中添加值列表下拉列表作为此字段语法的可能选项。



提前致谢。



Ian 



解决方案

你好Ian Guthrie,


如果你想在外部列表的表格中添加选择字段,默认情况下无法实现。


有一种解决方法,您可以将Business Connectivity Services用于外键。


有关更多详细信息,请参阅以下文章。


SharePoint 2013中外键的BCS外部项目选择器。


https://lightningtools.com/bcs/bcs-external-item-picker-for-foreign-key-in-sharepoint-2013/


祝你好运,


Sara Fan


I am trying to manually edit the (New, Edit, Display) forms associated with an external content type List.  I am able to edit the field names, do basic cosmetics, etc.  But what I need is to take a standard text field and make it uses choices (A,B,C) for example.  With Native SharePoint lists you can use the designer to create choices in just a few seconds.  But because I am using an external list tied to a SQL table, SharePoint only sees text fields as text fields and doesn't realize that these need to be choice fields from a drop down list.  So I now have to hard code this into the forms:  What is the syntax to do this?  If someone could provide me with an example this would really help me out.

As an example.  This is the code syntax for a standard text field:

<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="New" FieldName="Title" __designer:bind="{ddwrt:DataBind('i',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}"/>
<SharePoint:FieldDescription runat="server" id="ff1description{$Pos}" FieldName="Title" ControlMode="New"/>
</td>

So I just need to know how to add a list of values inside of a drop down list as the possible options for this field syntax wise.

Thanks in advance.

Ian 

解决方案

Hi Ian Guthrie,

If you want to add choice field in the forms in the external list, by default it cannot be achieved.

There is a workaround, you could use the Business Connectivity Services for foreign key.

For more detailed information, refer to the article below.

BCS External Item Picker for Foreign Key in SharePoint 2013.

https://lightningtools.com/bcs/bcs-external-item-picker-for-foreign-key-in-sharepoint-2013/

Best regards,

Sara Fan


这篇关于需要语法手动向(新建,编辑,显示)表单添加选项。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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