aSiteColumns statement
The aSiteColumns statement returns a collection of the column definitions for the columns available on the specified sites.
<aListCollection tableName=""> <from type=""></from> <fields></fields> <where></where> </aListCollection>aSiteColumns elements
Section titled “aSiteColumns elements”Specify one or more web sites from which to retrieve the column definitions. The type attribute will indicate how site urls are specified.
| Type | Description |
| Url | Specify one or more relative site url separated by a comma. A report’s parameter may be specified instead of a literal value. |
| ResultSet | Specify the tableName value of another statement. The resulting data from the statement must contain a column named “relativeSiteUrl”. |
The following statement will return all the column definitions for the columns available on the sites “/sites/ersdedemo/” and “/sites/ersdetest”.
Sample
<aSiteColumns tableName="SiteColumns"> <from type="Url">/sites/ersdedemo/,/sites/ersdetest/</from> <fields>*</fields> <where></where> </aSiteColumns>As the aSiteColumns statement returns all the columns created in the current site, in the parent sites and the default SharePoint columns, you may want to filter the columns to only have those that were created in the current site.
In the following example, the query will retrieve the column definitions for all the columns available on the site specified in another result set got by an aSiteCollection statement. This statement will return the properties for the site “/sites/ersdetest/demosubsite01/” that will be used as the source for the aSiteColumns statement.
The following query only returns columns created in the “/sites/ersdetest/demosubsite01/” site:
Sample
<root xmlns="http://enesyssoftware.com/schemas"> <aSiteCollection tableName="aSiteCollection1" filter="SpecifiedSite"> <from type="Url">/sites/ersdetest/demosubsite01/</from> <fields>WebID</fields> <where></where> </aSiteCollection> <aSiteColumns tableName="aSiteColumns1"> <from type="ResultSet">aSiteCollection1</from> <fields></fields> <where></where> </aSiteColumns> <sqlQuery tableName="sqlQuery1"> <![CDATA[SELECT * FROM aSiteColumns1, aSiteCollection1 WHERE UPPER(aSiteColumns1.SourceID) = UPPER(aSiteCollection1.WebID)]]> </sqlQuery> <resultSet>sqlQuery1</resultSet> </root>fields
Section titled “fields”Specify the fields to be returned by the statement.
| Field | Description |
|---|---|
| ID | The GUID of the field. |
| Name | The name of a field. |
| DisplayName | The displayed name for a field. |
| Group | The column group to which the field belongs. |
| Type | The type of the field. |
| Sealed | Boolean value that indicates whether other fields can be derived from the field. |
| AllowDeletion | Boolean value that specifies whether the field can be deleted. |
| Format | The type of date and time format that is used in the field. |
| SourceID | The namespace that defines the field or the GUID of the list in which the custom field has been created through the user interface. |
| StaticName | The internal name of the field. |
| Description | The description for a field. |
| Hidden | Boolean value that specifies whether the field is displayed in the list. |
| Required | Boolean value that determines whether the field requires values. |
| RichText | Boolean value that specifies whether rich text formatting can be used in the field. |
| RichTextMode | The rich text mode for the field. |
| ShowInFileDlg | Boolean value that specifies whether the field shows up in the property dialog box for saving forms that appears when saving from client applications. |
| ColName | An internal attribute that defines the mapping of the field to the physical storage name for this field. |
| RowOrdinal | The database location for the field. |
| ReadOnly | Boolean value that specifies whether values in the field can be modified. |
| List | The parent list that contains the field. |
| MaxLength | The maximum number of characters that can be typed in the field. |
| DisplaceOnUpgrade | Boolean value that indicates whether to force updates to field properties with the values that are specified in this field definition. |
| FromBaseType | Boolean value that indicates whether the field derives from a base field type. |
| FieldRef | The name of another field to which the field refers, such as a Lookup field. |
| ShowField | The ShowField attribute can be set to the field name to be displayed. |
| JoinColName | This attribute is defined only for Lookup fields. It is very similar to ColName, except it denotes the name of the column that is used in the SQL JOIN between the local and external lists. |
| JoinRowOrdinal | The database location for the referenced field. |
| JoinType | The type of JOIN used on the field. Possible values include INNER, LEFT OUTER, and RIGHT OUTER. |
| CanToggleHidden | Boolean value that indicates whether the column can be hidden through the user interface. |
| StorageTZ | Specifies how date/time values are stored. |
| Node | The XPath expression for a node that is promoted. |
| Sortable | Boolean value that determines whether the field can be sorted. |
| Filterable | Boolean value that indicates whether the field can be filtered. |
| AuthoringInfo | The descriptive string that is used in pages for editing fields to identify the field and its purpose. |
| ShowInDisplayForm | Boolean value that specifies whether the field is displayed in the form for displaying list items. |
| ShowInEditForm | Boolean value that specifies whether the field is displayed in the form that is used to edit list items. |
| ShowInListSettings | Boolean value that specifies whether the field is displayed in the page for customizing list settings. |
| ShowInNewForm | Boolean value that specifies whether the field is displayed in the form that is used to create list items. |
| ShowInVersionHistory | Boolean value that specifies whether the field is displayed in the page for viewing list item versions. |
| Version | The version of the field. |
| DisplayNameSrcField | Refers to the name of the other field. |
| Mult | Boolean value that specifies whether to use a scale factor in multiplication before displaying a number. |
| PrependId | Boolean value that specifies whether to add item IDs to the beginning of items listed in selection boxes within Edit forms. |
| IMEMode | The Input Method Editor (IME) mode bias to use for the field. The IME enables conversion of keystrokes between languages when one writing system has more characters than can be encoded for the given keyboard. |
| IsolateStyles | For a Text field whose RichText attribute is TRUE and whose RichTextMode attribute is FullHtml, this attribute specifies that a server will rewrite the HTML of the field to ensure that it will not interfere with the rendering of the surrounding page. |
| NumLines | The number of lines to display in the field. |
| ReadOnlyEnforced | Boolean value that specifies whether the user can change the field. |
| XName | Identify fields that have been added, deleted or modified. |
| Dir | The direction of the reading order for the field. |
| Percentage | Boolean value that determines whether values in the field are displayed as percentages. |
| Min | A minimum value for the field. |
| Max | A maximum value for the field. |
| FillInChoice | Boolean value that determines whether a text box for typing an alternative value is provided for the multichoice field. |
| RenderXMLUsingPattern | Boolean value that specifies whether to render value on the display pattern of the computed field |
| TextOnly | Boolean value that specifies whether the field can contain only Text values. |
| ClassInfo | The cascading style sheet (CSS) class to use for the field in the standard table view. |
| UnlimitedLengthInDocumentLibrary | Boolean value that specifies whether to allow values with unlimited text in document libraries. |
| AppendOnly | Boolean value that specifies whether to append changes to the existing text. |
| DisplayImage | The name of an icon that is displayed for the column. |
| ExceptionImage | The image file name to use for exceptions. |
| HeaderImage | The image file name to use as a header in the field. |
| Title | The display name for the field. |
| NoEditFormBreak | Boolean value that specifies whether to prevent a line break from being added between fields in the new item form or edit item form. |
| PITarget | The document processing instruction in which the column value is stored in documents of the specified content type, which is used for property promotion and demotion in XML documents. |
| PIAttribute | The document processing instruction in which the column value is stored in documents of the specified content type, which is used for property promotion and demotion in XML documents. |
| SetAs | |
| Width | The width in pixels of the images that are displayed for users in the User Information list. |
| Height | The height in pixels of the images that are displayed for users in the User Information list. |
| PrimaryPITarget | An alternative document processing instruction in which the column value is stored for documents of the specified content type. |
| PrimaryPIAttribute | An alternate attribute in the document processing instruction, specified by the PrimaryPITarget property, that is used as the column value in property promotion and demotion in XML documents. |
| RestrictedMode | Boolean value that specifies whether this text field is in restricted mode. |
| DisplaySize | The display size for the field. |
| WikiLinking | Boolean value that indicates whether wiki links, which appear in the form of double brackets ([[…]]), become translated to HTML links, which use the <a> tag. |
| CalType | The id for the type of calendar that is used to display the field. |
| Choices | The comma separated choices that are used in the multichoice field. |
| DefaultValue | The default value for a field. |
SQL Where clause used to filter the resulting data.
The following query returns information about columns (created in “/sites/ersdetest” site) which are in the “Base Columns” group. As the “group” word is a SQL reserved keyword, you must enclose it in braces:
Sample
<root xmlns="http://enesyssoftware.com/schemas"> <aSiteColumns tableName="aSiteColumns1"> <from type="Url">/sites/ersdetest/</from> <fields></fields> <where>[Group] = "Base Columns"</where> </aSiteColumns> <resultSet>aSiteColumns1</resultSet> </root>