SiteRefresh Type 10 is SiteRefresh multi-select data type. This type allows users to select more than one option, or it can be used to display additional field information.
![]() |
| This is an example of an Asset Type with a Type 10 field. |
A Type 10 field requires the use of a database query, and SiteRefresh is expecting two columns to be returned from the query: id and name. If your table does not contain these columns, you can use "sql alias", as seen in the example below.
There are two types of SiteRefresh Type 10; Classic and Basic. If you have sql query returning 1,000+ data, you should use Basic mode for better performance.
The following is an example of a "Classic" Type 10: (Most Popular use of a Type 10)
<field> <columnName>departments</columnName> <title>Departments</title> <label>Departments</label> <displaytype>classic</displaytype> <type>10</type> <sql>select corpid as id, deptname as name, description from departments order by name</sql> <isRequired>0</isRequired> <defaultValue></defaultValue> <maxLength></maxLength> <maxselect>5</maxselect> <displayFields>name,description</displayFields> <columnWidth>15,30</columnWidth> <Width>450</Width> <Height>70</Height> <isReadOnly>0</isReadOnly> <panel>main</panel> </field>
NOTE: Default display type is 'classic' if nothing is specified. If you want to get select all and unselect all buttons specify maxselect as -1.
The following is an example of a "Basic" Type 10: (Use for Large Queries)
<field> <columnName>departments</columnName> <title>Departments</title> <label>Departments</label> <type>10</type> <displaytype>basic</displaytype> <useHeader>true</useHeader> <columnWidth>15,30</columnWidth> <width>450</width> <height>55</height> <sql>select corpid as id, deptname as name, description from departments order by name</sql> <isRequired>0</isRequired> <defaultValue></defaultValue> <maxLength></maxLength> <maxselect>5</maxselect> <displayFields>name,description</displayFields> <isReadOnly>0</isReadOnly> <panel>main</panel> </field>
SiteRefresh Type 10:
- columnWidth is required for Basic.
- Width, Height, ColumnWidth should be used in the Classic Mode. (This allows for more flexibility.)
- displayType is not require, the default view is "Classic" mode.
We would highly recommend using the Column Width for the classic mode.
The following are fields specific to Type 10:
| Field Name | Description |
| sql | Database query. |
| maxselect | Maximum number of fields one can select. |
| ColumnWidth | The width of the columns. |
| Width | The Width of the Type 10 Box. |
| Height | The Height of the Type 10 Box. |
| displayFields | Which fields to display to the end user. |
Additional Information
- How to Query another table in a different Database
- Using CDATA to have code ingored by the XML Parser.
- How to query another Asset Type for Published Assets
