USP_DATALIST_INTERACTIONSUBCATEGORY
Lists all subcategories for a given interaction category.
Parameters
| Parameter | Parameter Type | Mode | Description | 
|---|---|---|---|
| @INTERACTIONCATEGORYID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. | 
| @INCLUDEINACTIVE | bit | IN | Include inactive | 
Definition
 Copy 
                                    
                    CREATE procedure dbo.USP_DATALIST_INTERACTIONSUBCATEGORY (
                        @INTERACTIONCATEGORYID uniqueidentifier,
                        @INCLUDEINACTIVE bit = 1
                    )
                    as
                        declare @SORTMETHODCODE tinyint;
                        set @SORTMETHODCODE = (select SORTMETHODCODE from dbo.INTERACTIONCATEGORY where ID = @INTERACTIONCATEGORYID);
                        set nocount on;
                        select    
                            ID,
                            NAME,
                            1 - ISINACTIVE,
                            SEQUENCE
                        from 
                            dbo.INTERACTIONSUBCATEGORY
                        where (INTERACTIONCATEGORYID = @INTERACTIONCATEGORYID) 
                        and (@INCLUDEINACTIVE = 1 or ISINACTIVE = 0)
                        order by
                            case @SORTMETHODCODE when 1 then SEQUENCE else 0 end,
                            NAME;