USP_DATALIST_SEARCHLISTPAGEREFERENCES

Displays information about the shell pages that use the given search list.

Parameters

Parameter Parameter Type Mode Description
@SEARCHLISTID uniqueidentifier IN Input parameter indicating the context ID for the data list.

Definition

Copy


CREATE procedure dbo.USP_DATALIST_SEARCHLISTPAGEREFERENCES
(
    @SEARCHLISTID uniqueidentifier
)
as
    set nocount on;

    with xmlnamespaces ('bb_appfx_pagedefinition' as tns, 'bb_appfx_commontypes' as common)
    select distinct
        P.ID,
        P.UINAME as NAME,
        P.DESCRIPTION,
        R.NAME as RECORDTYPE,
        case 
            when P.PAGEDEFINITIONSPEC.value('(tns:PageDefinitionSpec/tns:PageHeader/@ImageKey)[1]', 'nvarchar(200)') is null then 'res:page_definition_large'
            when left(ltrim(P.PAGEDEFINITIONSPEC.value('(tns:PageDefinitionSpec/tns:PageHeader/@ImageKey)[1]', 'nvarchar(200)')), 1) = '=' then 'res:page_definition_large'
            else P.PAGEDEFINITIONSPEC.value('(tns:PageDefinitionSpec/tns:PageHeader/@ImageKey)[1]', 'nvarchar(200)')
        end as IMAGEKEY
    from dbo.PAGEDEFINITIONCATALOG as P
        inner join dbo.UFN_SEARCHLIST_PAGEREFERENCES(@SEARCHLISTID) as T on P.ID = T.PAGEID
        left join dbo.RECORDTYPE as R on P.CONTEXTRECORDTYPEID = R.ID
    order by P.UINAME;