USP_DATAFORMTEMPLATE_VIEW_GROUPWEALTHSUMMARY
The load procedure used by the view dataform template "Group WealthPoint Wealth Summary View Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
@DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@REALESTATEASSETS | money | INOUT | Real estate |
@SECURITIESASSETS | money | INOUT | Securities |
@BUSINESSASSETS | money | INOUT | Business ownership |
@AFFLUENCEINDICATORSASSETS | money | INOUT | Affluence indicators |
@OTHERASSETS | money | INOUT | Other assets |
@TOTALASSETS | money | INOUT | Total assets |
@INCOME | money | INOUT | Income/compensation |
@C_REALESTATEASSETS | money | INOUT | Real estate |
@C_SECURITIESASSETS | money | INOUT | Securities |
@C_BUSINESSASSETS | money | INOUT | Business ownership |
@C_AFFLUENCEINDICATORSASSETS | money | INOUT | Affluence indicators |
@C_OTHERASSETS | money | INOUT | Other assets |
@C_TOTALASSETS | money | INOUT | Total assets |
@C_INCOME | money | INOUT | Income/compensation |
@NBIOGRAPHICAL | int | INOUT | Biographical |
@NCAMPAIGN | int | INOUT | Political donations |
@NFOUNDATION | int | INOUT | Private foundation affiliations |
@NGIFT | int | INOUT | Philanthropic gifts |
@NINCOME | int | INOUT | NINCOME |
@NAFFLUENCEINDICATORS | int | INOUT | Affluence indicators |
@NNONPROFIT | int | INOUT | Nonprofit affiliations |
@NOTHERASSETS | int | INOUT | NOTHERASSETS |
@NBUSINESS | int | INOUT | Number of businesses |
@NREALESTATE | int | INOUT | Number of properties |
@NSECURITIES | int | INOUT | NSECURITIES |
@C_NBIOGRAPHICAL | int | INOUT | Biographical |
@C_NCAMPAIGN | int | INOUT | Political donations |
@C_NFOUNDATION | int | INOUT | Private foundation affiliations |
@C_NGIFT | int | INOUT | Philanthropic gifts |
@C_NINCOME | int | INOUT | C_NINCOME |
@C_NAFFLUENCEINDICATORS | int | INOUT | Affluence indicators |
@C_NNONPROFIT | int | INOUT | Nonprofit affiliations |
@C_NOTHERASSETS | int | INOUT | C_NOTHERASSETS |
@C_NBUSINESS | int | INOUT | Number of businesses |
@C_NREALESTATE | int | INOUT | Number of properties |
@C_NSECURITIES | int | INOUT | C_NSECURITIES |
@CANVIEWBIOGRAPHICAL | bit | INOUT | CANVIEWBIOGRAPHICAL |
@CANVIEWCAMPAIGN | bit | INOUT | CANVIEWCAMPAIGN |
@CANVIEWFOUNDATION | bit | INOUT | CANVIEWFOUNDATION |
@CANVIEWGIFT | bit | INOUT | CANVIEWGIFT |
@CANVIEWINCOME | bit | INOUT | CANVIEWINCOME |
@CANVIEWAFFLUENCEINDICATORS | bit | INOUT | CANVIEWAFFLUENCEINDICATORS |
@CANVIEWNONPROFIT | bit | INOUT | CANVIEWNONPROFIT |
@CANVIEWOTHERASSETS | bit | INOUT | CANVIEWOTHERASSETS |
@CANVIEWBUSINESS | bit | INOUT | CANVIEWBUSINESS |
@CANVIEWREALESTATE | bit | INOUT | CANVIEWREALESTATE |
@CANVIEWSECURITIES | bit | INOUT | CANVIEWSECURITIES |
@CONSTITUENTID | uniqueidentifier | INOUT | Constituent ID |
@HASBEENSEARCHED | bit | INOUT | HASBEENSEARCHED |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_GROUPWEALTHSUMMARY
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CURRENTAPPUSERID uniqueidentifier,
@REALESTATEASSETS money = null output,
@SECURITIESASSETS money = null output,
@BUSINESSASSETS money = null output,
@AFFLUENCEINDICATORSASSETS money = null output,
@OTHERASSETS money = null output,
@TOTALASSETS money = null output,
@INCOME money = null output,
@C_REALESTATEASSETS money = null output,
@C_SECURITIESASSETS money = null output,
@C_BUSINESSASSETS money = null output,
@C_AFFLUENCEINDICATORSASSETS money = null output,
@C_OTHERASSETS money = null output,
@C_TOTALASSETS money = null output,
@C_INCOME money = null output,
@NBIOGRAPHICAL int = null output,
@NCAMPAIGN int = null output,
@NFOUNDATION int = null output,
@NGIFT int = null output,
@NINCOME int = null output,
@NAFFLUENCEINDICATORS int = null output,
@NNONPROFIT int = null output,
@NOTHERASSETS int = null output,
@NBUSINESS int = null output,
@NREALESTATE int = null output,
@NSECURITIES int = null output,
@C_NBIOGRAPHICAL int = null output,
@C_NCAMPAIGN int = null output,
@C_NFOUNDATION int = null output,
@C_NGIFT int = null output,
@C_NINCOME int = null output,
@C_NAFFLUENCEINDICATORS int = null output,
@C_NNONPROFIT int = null output,
@C_NOTHERASSETS int = null output,
@C_NBUSINESS int = null output,
@C_NREALESTATE int = null output,
@C_NSECURITIES int = null output,
@CANVIEWBIOGRAPHICAL bit = null output,
@CANVIEWCAMPAIGN bit = null output,
@CANVIEWFOUNDATION bit = null output,
@CANVIEWGIFT bit = null output,
@CANVIEWINCOME bit = null output,
@CANVIEWAFFLUENCEINDICATORS bit = null output,
@CANVIEWNONPROFIT bit = null output,
@CANVIEWOTHERASSETS bit = null output,
@CANVIEWBUSINESS bit = null output,
@CANVIEWREALESTATE bit = null output,
@CANVIEWSECURITIES bit = null output,
@CONSTITUENTID uniqueidentifier = null output,
@HASBEENSEARCHED bit = null output
) as
set nocount on;
set @DATALOADED = 0;
select
@DATALOADED = 1,
@CONSTITUENTID = @ID
from
dbo.CONSTITUENT
where
CONSTITUENT.ID = @ID;
exec dbo.USP_GROUP_GETWEALTHSUMMARY @GROUPID = @ID,
@REALESTATEASSETS = @REALESTATEASSETS output,
@SECURITIESASSETS = @SECURITIESASSETS output,
@BUSINESSASSETS = @BUSINESSASSETS output,
@AFFLUENCEINDICATORSASSETS = @AFFLUENCEINDICATORSASSETS output,
@OTHERASSETS = @OTHERASSETS output,
@TOTALASSETS = @TOTALASSETS output,
@INCOME = @INCOME output,
@C_REALESTATEASSETS = @C_REALESTATEASSETS output,
@C_SECURITIESASSETS = @C_SECURITIESASSETS output,
@C_BUSINESSASSETS = @C_BUSINESSASSETS output,
@C_AFFLUENCEINDICATORSASSETS = @C_AFFLUENCEINDICATORSASSETS output,
@C_OTHERASSETS = @C_OTHERASSETS output,
@C_TOTALASSETS = @C_TOTALASSETS output,
@C_INCOME = @C_INCOME output,
@NBIOGRAPHICAL = @NBIOGRAPHICAL output,
@NCAMPAIGN = @NCAMPAIGN output,
@NFOUNDATION = @NFOUNDATION output,
@NGIFT = @NGIFT output,
@NINCOME = @NINCOME output,
@NAFFLUENCEINDICATORS = @NAFFLUENCEINDICATORS output,
@NNONPROFIT = @NNONPROFIT output,
@NOTHERASSETS = @NOTHERASSETS output,
@NBUSINESS = @NBUSINESS output,
@NREALESTATE = @NREALESTATE output,
@NSECURITIES = @NSECURITIES output,
@C_NBIOGRAPHICAL = @C_NBIOGRAPHICAL output,
@C_NCAMPAIGN = @C_NCAMPAIGN output,
@C_NFOUNDATION = @C_NFOUNDATION output,
@C_NGIFT = @C_NGIFT output,
@C_NINCOME = @C_NINCOME output,
@C_NAFFLUENCEINDICATORS = @C_NAFFLUENCEINDICATORS output,
@C_NNONPROFIT = @C_NNONPROFIT output,
@C_NOTHERASSETS = @C_NOTHERASSETS output,
@C_NBUSINESS = @C_NBUSINESS output,
@C_NREALESTATE = @C_NREALESTATE output,
@C_NSECURITIES = @C_NSECURITIES output;
if @TOTALASSETS is null
set @HASBEENSEARCHED = 0
else
set @HASBEENSEARCHED = 1
if (1=dbo.UFN_APPUSER_ISSYSADMIN(@CURRENTAPPUSERID)) begin
set @CANVIEWBIOGRAPHICAL = 1;
set @CANVIEWCAMPAIGN = 1;
set @CANVIEWFOUNDATION = 1;
set @CANVIEWGIFT = 1;
set @CANVIEWINCOME = 1;
set @CANVIEWAFFLUENCEINDICATORS = 1;
set @CANVIEWNONPROFIT = 1;
set @CANVIEWOTHERASSETS = 1;
set @CANVIEWBUSINESS = 1;
set @CANVIEWREALESTATE = 1;
set @CANVIEWSECURITIES = 1;
end
else begin
set @CANVIEWBIOGRAPHICAL = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'287037C9-70F7-4e0a-9B29-F5B2EC116F68');
set @CANVIEWCAMPAIGN = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'945D8844-F0C6-4612-A7DE-8A35DA92A172');
set @CANVIEWFOUNDATION = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'B754842E-0E5A-44be-A65F-BC1DFCB0A518');
set @CANVIEWGIFT = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'9D17C125-4F6B-4ea4-B535-76B59A072883');
set @CANVIEWINCOME = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'90F63879-EC2D-4402-9658-44E4E99FA922');
set @CANVIEWAFFLUENCEINDICATORS = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'022ED43F-874C-40c4-93E4-4DA3D8D6E0D3');
set @CANVIEWNONPROFIT = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'889A3A40-738B-4cd4-8BE1-C9A170E89B1E');
set @CANVIEWOTHERASSETS = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'13CA1AA9-5B67-4253-94E5-17A3D614AFC1');
set @CANVIEWBUSINESS = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'6E93C3E8-D457-4a31-AD72-EEA4AFF67165');
set @CANVIEWREALESTATE = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'26812091-8971-431d-8D30-6B24AB719E1E');
set @CANVIEWSECURITIES = dbo.UFN_SECURITY_APPUSER_GRANTED_DATALIST_IN_SYSTEMROLE(@CURRENTAPPUSERID,'5BECE7F0-9AFF-4b33-A620-9D043891D271');
end
return 0;