DataGrid
= 100 THEN 'Custom: ' + Grp.[Name]
ELSE ''
END AS [SchemeName]
,PD.[Scheme] AS [SchemeEnum]
,CASE
WHEN PD.[Scheme] = 1 OR PD.[Scheme] = 6 THEN 'Both' -- UOM or Currency
WHEN PD.[Scheme] <= 8 THEN 'Text'
ELSE 'Member' -- collection member GUID
END AS [DataType]
,PD.[DefaultValue] AS [DefaultString]
,ISNULL(BO.[Name],'') AS [DefaultSelection]
,ISNULL(CONVERT(varchar(40), PD.[UomId]),'NULL') AS [DefaultSelectionId]
,LTRIM(RTRIM(PD.[DefaultValue] + ' ' + ISNULL(BO.[Name],''))) AS [DefaultTextValue]
,PD.[IsMultiple]
,PD.[Id] AS [PropDescId]
FROM
[PDXpertDB].[dbo].[PropertyDescriptor_View] PD
INNER JOIN BusinessObject_View Typ ON Typ.[Id] = PD.[ItemType]
LEFT JOIN [CustomGroup_View] Grp ON (100 + Grp.[Uid]) = PD.[Scheme]
LEFT JOIN [BusinessObject_View] BO ON BO.[Id] = PD.[UomId]
ORDER BY
PD.[Name] COLLATE SQL_Latin1_General_CP1_CS_AS, [Class], [CollectionMember], [SortLayout]
]]>