CAML(Collaborative Application Markup Language)——协作应用程序标记语言,在调用WSS提供的诸多Web Service时进行数据查询的一组XML规范,通过这种规范组织查询语句进行数据的检索。我在这里不想再具体介绍CAML的使用规范和具体语法了,读者在MSDN或者园子里的其它文章中都可以了解到。(文/
当服务器上安装有WSS的多语言包时,根据不同的语言ContentType的值也会有不同的写法,可以借助CAML工具或者在WSS查询返回的报文中查看一下,确认ContentType的具体类型名称。
3.
4.
| ID | The ID is a globally unique identifier (GUID) which you should generate for each field. This ID will be used in lists when referencing the site column |
| Type | The type indicates the data type of the column and can be of the any following: |
| AllDayEvent | The all day event flag is used in calendar lists. |
| Attachments | The URL of an attachment. |
| Boolean | A boolean indicator with Yes/No. |
| Calculated | Indicates that the column is a calculated column based on a expression. |
| Choice | Indicates that the column is choice from a list of items |
| Computed | Indicates the field's value is dependant on another field's value. |
| ContentTypeId | A Content Type ID value. |
| Counter | An internal unique ID's / counter for each item. |
| Currency | A currency value (its format depends on the locale). |
| DateTime | A Date and Time field. |
| File | A file object when used in document libraries. |
| GridChoice | A rating scale as used in surveys |
| Guid | A globally unique identifier. |
| Integer | An integer number field. |
| Lookup | The field is a lookup which is a choice, however the choice is from another list. |
| LookupMulti | A lookup field, however multiple selections are allowed. |
| ModStat | An approval status. |
| MultiChoice | A choice field, however multiple selections are allowed |
| Note | Multiple lines of text which can be plain or formatted. |
| Number | A numerical field which allows decimal places. |
| PageSeparator | A page separator field, for surveys. |
| Recurrence | An indicator that identifies the field as a reoccurring calendar event. |
| Text | A single line of text |
| ThreadIndex | The ID of a discussion thread. |
| Threading | Indicates the field supports threading (in discussions). |
| URL | A Unified Resource Locator (URL) is stored. |
| User | A person or group. |
| UserMulti | A person or group, however multiple people or groups can be selected. |
| WorkflowEventType | Contains the type of workflow history event (used in workflow history list). |
| WorkflowStatus | The status of a workflow is stored. |
| Title | The name of the field as displayed in the user interface. This title may be set using a resource file. |
| Name | (optional) The name of the field which should be guaranteed to never change. The default is the Title with spaces and invalid characters removed. |
| StaticName | (optional) The logical name of the field which is similar to Name, however this can be programmatically changed. |
| DisplayName | (optional) See title. |
| Description | (optional) A description of the field which will be displayed in front ends. The description can be placed into a resource file. |
| Required | (optional) Indicates whether or not the field is mandatory. The default is FALSE. |
| MaxLength | (optional) The maximum number of characters allowed. |
| Hidden | (optional) Indicates that the field should be hidden from the interface. If TRUE, this field will not be shown on views or forms. The default is FALSE. |
| Readonly | (optional) The field should be read-only and can be displayed and not edited. The default is FALSE. |
| ShowInDisplayForm | (optional) Indicates whether the field should be shown on a display form. The default is TRUE. |
| ShowInEditForm | (optional) Indicates whether the field should be shown on an edit form. The default is TRUE. |
| ShowInListSettings | (optional) Indicates whether the field should be shown in the list settings screen. The default is TRUE. |
| ShowInNewForm | (optional) Indicates whether the field should be shown on a New form. The default is TRUE. |
| ShowInVersionHistory | (optional) Indicates whether the field should be shown in the version history of an item. The default is TRUE. |
| ShowInViewForms | (optional) Indicates whether the field should be shown on a view form. The default is TRUE. |
| Group | (optional) A group name allowing you to group fields together. |
5.
在Customer List中创建一个新列时,Sharepoint同时给它赋予了内部名称(FieldInternalName)和外部名称(FieldName),初始状态下内部名称和外部名称是相同的,当我们修改了List的列名时,外部名称被修改了,而内部名称则不变,为了防止在使用时出现找不到列的错误,必须在CAML中使用内部名称作为列名。可以借助CAML工具查找列的内部名称,也可以在List的新建记录页面中查看源代码,搜索显示的列名,找到类似于下面的代码段,FieldInternalName的值即为该列的内部名称。
6.