Search List Spec
<SearchListSpec
xmlns="bb_appfx_searchlist"
xmlns:common="bb_appfx_commontypes"
ID="0960dc93-7fa5-4a31-b739-8dfbb29d4b5b"
Name="Example Search"
Description="A search list for locating example records"
Author="Technical Training"
RecordType="Example"
TranslationFunctionID="8021b7b7-c710-4418-888f-aed036730963"
>
<!-- describe the SP used to fetch the results from the given filters. Note that the @MAXROWS parameter is required, and should be
used to limit the number of rows returned to a reasonable number. -->
<SPSearchList SPName="USR_USP_SEARCHLIST_EXAMPLE">
<common:CreateProcedureSQL>
<![CDATA[
create procedure dbo.USR_USP_SEARCHLIST_EXAMPLE
(
@SHORTNAME nvarchar(10) = null,
@LONGNAME nvarchar(20) = null,
@MAXROWS smallint = 500
)
as
set @SHORTNAME = dbo.UFN_SEARCHCRITERIA_GETLIKEPARAMETERVALUE(@SHORTNAME, 0, null);
select top(@MAXROWS)
ID,
SHORTNAME,
LONGNAME,
DESCRIPTION,
RATING
from
dbo.USR_EXAMPLE
where
(SHORTNAME LIKE @SHORTNAME) OR (LONGNAME LIKE @LONGNAME)
order by
SHORTNAME asc
] ]>
</common:CreateProcedureSQL>
</SPSearchList>
<!-- describe the filter fields for the search screen -->
<common:FormMetaData>
<common:FormFields>
<common:FormField FieldID="SHORTNAME" Caption="Name" DataType="String" MaxLength="10" />
<common:FormField FieldID="LONGNAME" Caption="Long name" DataType="String" MaxLength="20" />
</common:FormFields>
</common:FormMetaData>
<!-- also describe the output fields for the search screen -->
<Output TranslationField="SHORTNAME">
<OutputFields>
<OutputField FieldID="ID" Caption="ID" DataType="Guid" IsHidden="true" />
<OutputField FieldID="SHORTNAME" Caption="Name" DataType="String" />
<OutputField FieldID="LONGNAME" Caption="Long name" DataType="String" />
<OutputField FieldID="DESCRIPTION" Caption="Description" DataType="String" />
<OutputField FieldID="RATING" Caption="Rating" DataType="Decimal" />
</OutputFields>
</Output>
</SearchListSpec>