USP_SIMPLEDATALIST_INTERACTIONSITES

List of all sites in the system that a given user could interact with (based on Role assignments) and any sites assigned to the interaction that the user does not otherwise have access.

Parameters

Parameter Parameter Type Mode Description
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.
@INTERACTIONID uniqueidentifier IN INTERACTIONID

Definition

Copy


                create procedure dbo.USP_SIMPLEDATALIST_INTERACTIONSITES(
                    @CURRENTAPPUSERID uniqueidentifier,
                    @INTERACTIONID uniqueidentifier
                )                            
                as                

                    set nocount on;

                    select 
                        SFU.[SITEID] as VALUE
                        SITE.[NAME] as LABEL 
                    from 
                        dbo.SITE inner join dbo.UFN_SITESFORUSER(@CURRENTAPPUSERID) AS SFU
                        ON SFU.SITEID=SITE.ID
                    union
                    select
                        INTERACTIONSITE.SITEID as VALUE,
                        SITE.NAME as LABEL
                    from
                        dbo.INTERACTIONSITE
                        inner join dbo.SITE on SITE.ID = INTERACTIONSITE.SITEID
                    where
                        INTERACTIONSITE.INTERACTIONID = @INTERACTIONID
                    order by
                        LABEL;