Org Givers¶
This script runs from the OrgSearch Blue Toolbar. It shows all members of each organization in the search with an indicator whether that person is in a giving family unit. This way, if anybody in that family gives, regardless of Joint giving option, that person will be indicated as a giver. The script looks back 365 days and considers all funds.
The comment at the top of the script ensures that this report can only be run by a Finance user.
The recommended name is OrgGivers
Use the following code to Create the SQL Script. See How to create a SQL Script.
--Roles=Finance
DECLARE @td DATETIME = GETDATE()
DECLARE @fd DATETIME = DATEADD(DAY, -365, @td)
SELECT
p.FamilyId,
om.PeopleId,
om.OrganizationId,
p.Name2,
g.FamGive,
o.OrganizationName
FROM dbo.OrganizationMembers om
JOIN dbo.SplitInts(@OrgIds) ON Value = om.OrganizationId
JOIN dbo.Organizations o ON o.OrganizationId = om.OrganizationId
JOIN dbo.People p ON p.PeopleId = om.PeopleId
LEFT JOIN dbo.FamilyGiver(@fd, @td, NULL) g ON g.PeopleId = om.PeopleId
ORDER BY o.OrganizationName, p.Name2
Latest Update |
11/13/2020 |
Modify image link with secure protocol.