V_QUERY_CONSTITUENTINVITEE

This provides the ability to query for a constituent's invitee records.

Fields

Field Field Type Null Description
ID uniqueidentifier System record ID
CONSTITUENTID uniqueidentifier Constituent system ID
CONSTITUENTNAME nvarchar(154) yes Name
REGISTRANTID uniqueidentifier yes Registrant system ID
REGISTERED bit yes Registered
STATUS varchar(24) Status
EVENTID uniqueidentifier Event system ID
DECLINED bit Declined
DATEADDED datetime Date added
DATECHANGED datetime Date changed
TSLONG bigint yes Timestamp value
ADDEDBYAPPLICATION nvarchar(200) yes Added by application
ADDEDBYUSERNAME nvarchar(128) yes Added by user name
CHANGEDBYAPPLICATION nvarchar(200) yes Changed by application
CHANGEDBYUSERNAME nvarchar(128) yes Changed by user name

Definition

Copy
/*
Generated by Blackbaud AppFx Platform
Date:  3/28/2016 5:44:49 PM
Assembly Version:  Blackbaud.AppFx.Platform.SqlClr, Version=4.0.158.0, Culture=neutral, PublicKeyToken=null
Copyright Blackbaud
*/
CREATE VIEW dbo.V_QUERY_CONSTITUENTINVITEE AS



                select
                    INVITEE.ID,
                    INVITEE.CONSTITUENTID,
                    dbo.UFN_CONSTITUENT_BUILDNAME(INVITEE.CONSTITUENTID) [CONSTITUENTNAME],
                    REGISTRANT.ID [REGISTRANTID],
                    cast
                    (
                        case
                            when REGISTRANT.CONSTITUENTID is null then 0
                            else 1
                        end
                        as bit
                    ) [REGISTERED],
                    case
                        when REGISTRANT.CONSTITUENTID is not null then 'Registered'
                        when INVITEE.DECLINED = 1 then 'Declined'
                        when INVITEE.INVITATIONSENTON is not null then 'Invited with no response'
                        else 'Not yet invited'
                    end [STATUS],
                    INVITEE.EVENTID,
                    INVITEE.DECLINED,
                    INVITEE.DATEADDED,
                    INVITEE.DATECHANGED,
                    INVITEE.TSLONG,
                    ADDEDBY.APPLICATIONNAME as ADDEDBYAPPLICATION,
                    ADDEDBY.USERNAME as ADDEDBYUSERNAME,
                    CHANGEDBY.APPLICATIONNAME as CHANGEDBYAPPLICATION,
                    CHANGEDBY.USERNAME as CHANGEDBYUSERNAME
                    /*#EXTENSION*/ 
                from 
                    dbo.INVITEE
                    left join dbo.REGISTRANT on
                        REGISTRANT.CONSTITUENTID = INVITEE.CONSTITUENTID
                        and REGISTRANT.EVENTID = INVITEE.EVENTID
                    left join dbo.CHANGEAGENT as ADDEDBY on ADDEDBY.ID = INVITEE.ADDEDBYID
                    left join dbo.CHANGEAGENT as CHANGEDBY on CHANGEDBY.ID = INVITEE.CHANGEDBYID