USP_DATALIST_SIMPLEDATALISTPARAMETERS
Displays the parameters defined for the given simple data list.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@SIMPLEDATALISTID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_SIMPLEDATALISTPARAMETERS
(
@SIMPLEDATALISTID uniqueidentifier
)
as
set nocount on;
with xmlnamespaces ('bb_appfx_simpledatalist' as tns, 'bb_appfx_commontypes' as common)
select
simpledatalist.parameters.value('@FieldID', 'nvarchar(max)') as FIELDID,
simpledatalist.parameters.value('@Caption', 'nvarchar(max)') as CAPTION,
simpledatalist.parameters.value('@DataType', 'nvarchar(max)') as DATATYPE,
case
when simpledatalist.parameters.exist('common:CodeTable') = 1 then
'Code Table ('
+ (select UINAME from dbo.CODETABLECATALOG where DBTABLENAME = simpledatalist.parameters.value('(common:CodeTable/@CodeTableName)[1]', 'nvarchar(100)'))
+ ')'
when simpledatalist.parameters.exist('common:ValueList') = 1 then 'Value List'
when simpledatalist.parameters.exist('common:SimpleDataList') = 1 then
'Simple Data List ('
+ (select UINAME from dbo.SIMPLEDATALISTCATALOG where ID = simpledatalist.parameters.value('(common:SimpleDataList/@SimpleDataListID)[1]', 'nvarchar(60)'))
+ ')'
when simpledatalist.parameters.exist('common:Collection') = 1 then 'Collection'
when simpledatalist.parameters.exist('common:SearchList') = 1 then
'Search List ('
+ (select UINAME from dbo.SEARCHLISTCATALOG where ID = simpledatalist.parameters.value('(common:SearchList/@SearchListID)[1]', 'nvarchar(60)'))
+ ')'
when simpledatalist.parameters.exist('common:Link') = 1 then 'Link'
when simpledatalist.parameters.exist('common:File') = 1 then 'File'
when simpledatalist.parameters.exist('common:CreditCard') = 1 then 'Credit Card'
when simpledatalist.parameters.exist('common:Html') = 1 then 'Html'
else ''
end as DESCRIPTOR,
case
when simpledatalist.parameters.exist('common:CodeTable') = 1 then 1
when simpledatalist.parameters.exist('common:ValueList') = 1 then 2
when simpledatalist.parameters.exist('common:SimpleDataList') = 1 then 3
when simpledatalist.parameters.exist('common:Collection') = 1 then 4
when simpledatalist.parameters.exist('common:SearchList') = 1 then 5
when simpledatalist.parameters.exist('common:Link') = 1 then 6
when simpledatalist.parameters.exist('common:File') = 1 then 7
when simpledatalist.parameters.exist('common:CreditCard') = 1 then 8
when simpledatalist.parameters.exist('common:Html') = 1 then 9
else 0
end as DESCRIPTORTYPE,
case
when simpledatalist.parameters.exist('common:CodeTable') = 1 then
(select ID from dbo.CODETABLECATALOG where DBTABLENAME = simpledatalist.parameters.value('(common:CodeTable/@CodeTableName)[1]', 'nvarchar(100)'))
when simpledatalist.parameters.exist('common:ValueList') = 1 then null
when simpledatalist.parameters.exist('common:SimpleDataList') = 1 then
simpledatalist.parameters.value('(common:SimpleDataList/@SimpleDataListID)[1]', 'uniqueidentifier')
when simpledatalist.parameters.exist('common:Collection') = 1 then null
when simpledatalist.parameters.exist('common:SearchList') = 1 then
simpledatalist.parameters.value('(common:SearchList/@SearchListID)[1]', 'uniqueidentifier')
when simpledatalist.parameters.exist('common:Link') = 1 then null
when simpledatalist.parameters.exist('common:File') = 1 then null
when simpledatalist.parameters.exist('common:CreditCard') = 1 then null
when simpledatalist.parameters.exist('common:Html') = 1 then null
else null
end as DESCRIPTORID,
dbo.UFN_INSTALLEDPRODUCTS_TRANSLATELIST(simpledatalist.parameters.query('common:InstalledProductList')) as INSTALLEDPRODUCTSLIST,
dbo.UFN_INSTALLEDPRODUCTS_OPTIONALPRODUCTSINSTALLED(simpledatalist.parameters.query('common:InstalledProductList')) as INSTALLED
from dbo.SIMPLEDATALISTCATALOG as S
cross apply S.SIMPLEDATALISTSPECXML.nodes('tns:SimpleDataListSpec/tns:Parameters/common:FormMetaData/common:FormFields/common:FormField') as simpledatalist(parameters)
where S.ID = @SIMPLEDATALISTID