Type (as shown on the Create Column page) Field Type Notes MSDN Links
Single line of text Type=”Text”   Microsoft.Sharepoint.SPFieldText
Multiple lines of text Type=”Note” In the Create Column page, can pick the type of text to allow. To enable the different sub-types, you need to set a couple of other attributes on the field element.

Plain Text
RichText=”FALSE”  (default value)

Rich Text
RichText=”TRUE”
RichTextMode=”Compatible”  (default value)

Enhanced Text
RichText=”TRUE”
RichTextMode=”FullHtml”

In addition, you can also set the number of lines to display using the NumLine attribute.

Further Information on MSDN:

Microsoft.Sharepoint.SPFieldMultiLineText
Choice (menu to choose from) Single Choice
Type=”Choice”

Multi-Choice
Type=”MultiChoice"

Pick the display format for the Choice and Multi-Choice types, respectively:

Drop-Down Menu or Combo Box
Format=”Dropdowns”

Radio Buttons or Check Boxes
Format=”RadioButtons”

Define the options a user can pick from using the Choices element. Below is a skeleton to explain this.

<Field Name=”MyOptions” Type=……>
  <CHOICES>
     <CHOICE>Option 1</CHOICE>
     <CHOICE>Option 2</CHOICE>
  </CHOICES>
</Field>

If you would like to give the user an option to add their own value, set the attribute FillInChoice=”TRUE”.

Microsoft.Sharepoint.SPFieldChoice
Microsoft.Sharepoint.SPFieldMultiChoice
Number Type=”Integer” This field type also lets you define:

Minimum Value (0 for example)
Min=”0”

Maximum Value (100 for example)
Max=”100”

Decimal Places (Default is Automatic, example 2 decimal places)
Decimals=”2”

Show as Percentage (Default is False)
Percentage=”FALSE”

Microsoft.SharePoint.SPFieldNumber

Currency Type=”Currency” This field type also lets you define:

Minimum Value (0 for example)
Min=”0”

Maximum Value (100 for example)
Max=”100”

Decimal Places (Default is Automatic, example 2 decimal places)
Decimals=”2”

Currency Format
This sets the display format of the currency.

LCID=”3081”

3081 sets the format English – Australian. For a complete list of Locales, see the MSDN link in the next column.

Microsoft.Sharepoint.SPFieldCurrency

Locale IDs

Date and Time Type=”DateTime” This field also lets you define:

Date and Time Format
Show the date only:
Format=”DateOnly”

Show the date and time:
Format=”DateTime”

Microsoft.Sharepoint.SPFieldDateTime
Yes/No Type=”Boolean” When setting the default value, you need to use the binary values:

No/False = 0
Yes/True = 1

Microsoft.Sharepoint.SPFieldBoolean
Person or Group Single User or Group
Type=”User”

Multiple Users or Groups
Type=”MultiUser”

This field also lets you define:

Allow multiple selections 
Set the Type to MultUser and the attribute Mult=”TRUE”

Allow selection of
People Only
UserSelectionMode=”PeopleOnly”

People and Groups
UserSelectionMode=”PeopleAndGroups”

Choose from
If you want to limit the option list to a SharePoint Group, use the UserSelectionScope attribute. Set it to the ID of the SharePoint group (Integer value). For example, UserSelectionScope=”3”.

Show field
Set the name of the field from the User’s profile properties that you want to display. For example, show the user’s name property:
ShowField=”Name”

If you would also like to show presence (Office Communicator integration required):
Presence=”TRUE”

Microsoft.Sharepoint.SPFieldUser
Hyperlink or Picture Type=”URL” You can display the URL as a Hyperlink or Picture. Use the Format attribute to pick which one:

Hyperlink
Format=”Hyperlink”

Picture
Format=”Image”

share point 字段类型的更多相关文章

  1. Oracle修改字段类型方法总结

    有一个表名为tb,字段段名为name,数据类型nchar(20). 1.假设字段数据为空,则不管改为什么字段类型,可以直接执行:alter table tb modify (name nvarchar ...

  2. 关于SubSonic3.0插件使用SubSonic.Query.Select查询时,字段类型为tinyint时列丢失问题的Bug修复

    下午在写代码时,突然发现一个列名为Enable的字段怎么也查询不出来,开始以为可能这个名称是关键字,所以给过滤掉了,所以就将名称修改为IsEnable,问题还是一样......将名称又改为IsEnab ...

  3. Django model字段类型清单

    转载:<Django model字段类型清单> Django 通过 models 实现数据库的创建.修改.删除等操作,本文为模型中一般常用的类型的清单,便于查询和使用: AutoField ...

  4. SQL常用字段类型

    中文常用字段类型 1.   名称类    nvarchar(10) 2.   数量       int 3.   时间      date 4.   货币      money 5.   编号     ...

  5. SQL数据库中字段类型 与C#中的对应字段类型

    数据库中的字段类型和对应的C#中的对应字段类型 数据库                 C#程序int int32text stringbigint int64binary System.Byte[] ...

  6. Solr内置的字段类型

    字段类型在org.apache.solr.schema包下 Class 描述 BCDIntField 二进制整形字段 BCDLongField 二进制长整形字段 BCDStrField 二进制字符型字 ...

  7. django:field字段类型

    字段类型(Field types) AutoField 它是一个根据 ID 自增长的 IntegerField 字段.通常,你不必直接使用该字段.如果你没在别的字段上指定主 键,Django 就会自动 ...

  8. mongodb字段类型转化

    最近在使用mongoDB, 发现mongo对字段类型的定义并不是很严格,完全依赖传入数据的类型,在加上PHP是弱类型的语言,所以难免会出现一些错误.如果预想的类型是Int型,但数据存储的是String ...

  9. sqlserver字段类型

    bit    整型 bit数据类型是整型,其值只能是0.1或空值.这种数据类型用于存储只有两种可能值的数据,如Yes 或No.True 或False .On 或Off. 注意:很省空间的一种数据类型, ...

随机推荐

  1. Jmeter之乱码 (二)

    Jmeter查看结果树中响应结果中出现乱码,如下图所示: 解决方案: 修改Jmeter的默认字符编码与测试系统一致,修改{JMETER_HOME}\bin\jmeter.properties文件,如下 ...

  2. Python中常见的异常总结

    Python中常见的异常总结 当Python检测到一个错误时,解释器就会指出当前流已经无法继续执行下去,这时候就出现了异常. 一.异常错误    a.语法错误     错误一:     if     ...

  3. python操作oracl数据库

    #查询交易系统数据,判断当日是否有港股交易 import cx_Oracleimport os conn = Nonecursor = None hkfile = 'hk.txt'nohkfile = ...

  4. 查询处理Oracle锁表的问题

    --以下几个为相关表SELECT * FROM v$lock;SELECT * FROM v$sqlarea;SELECT * FROM v$session;SELECT * FROM v$proce ...

  5. Lombok的用法

    Lombok是一款Java开发插件,使得Java开发者可以通过其定义的一些注解来消除业务工程中冗长和繁琐的代码,尤其对于简单的Java模型对象(POJO).在开发环境中使用Lombok插件后,Java ...

  6. HDU 2100 Lovekey (26进制大数、字符串)

    Lovekey Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Sub ...

  7. 一台 Java 服务器可以跑多少个线程?

    一台Java服务器能跑多少个线程? 这个问题来自一次线上报警如下图,超过了我们的配置阈值. 京东自研UMP监控分析 打出jstack文件,通过IBM Thread and Monitor Dump A ...

  8. 洛谷 P3386 二分图匹配 题解

    题面 这道题虽然是练习匈牙利算法的,但可以用网络流来切掉它: 我们可以建立一个超级源和一个超级汇,超级源连接左部分点,超级汇连接右部分点: 然后在该图上跑最大流就可以了: PS:我设的超级源是2001 ...

  9. 洛谷 P3368 树状数组 题解

    题面 本题随便看两眼就知道该题满足了优美的查分性质: 对于在区间[x,y]内操作时,应该将查分数组的第x项和第y+1项进行相反操作: 询问答案时,问第i个数的值就是查分数组的前i项和: 暴力+玄学卡常 ...

  10. CSS 相对定位 绝对定位

    css中的相对定位和绝对定位. 定位标签:position 包含属性:relative(相对) absolute(绝对) 1.position:relative; 如果对一个元素进行相对定位,首先它将 ...