Select your user interface:
Explore a Data List Spec (SP)
Data lists are composed of four main elements:
-
A stored procedure or .NETCLR class that returns a result set
-
A context definition that defines the type of record to base the list on
-
An optional set of parameters that the stored procedure accepts
-
A set of output field metadata for how to render the results of the stored procedure
After you add a Data List Spec (SP) to the project, notice that the spec contains SPDataList, Context, Parameters, and Output elements. Let's view a typical Data List Spec that comes with the Widget Catalog project as part of the SDK. The figure below displays a sample data list named WidgetParts.DataList.XML that can be found within the samples section of the SDK.
Figure: A typical SP data list
Figure: The widget Parts data list user interface
Within SPDataList, the CreateProcedureSQL child element includes a stubbed out stored procedure. The stored procedure will more than likely narrow the result set based upon a parameter or context. The context may be defined by the Context element that indicates the record type of the context and the stored procedure parameter that provides the context ID for the data list to filter upon. Within the user interface, you can provide filtering capabilities on the data list. Filters are possible via the Parameters element where you provide form field metadata to describe the FieldID and the DataType of the filter. The Output element contains a list of OutputField child elements that defines which fields the data list displays. Within the OutputField element, the FieldID attribute corresponds to a field name returned by the stored procedure.