Has Multiple Main Fellowships

This script can be added to the blue Toolbar and will be available on Search Builder results, an Organization, or a Tag. If you run it from Special Content, the report will look at the last Search Builder results and runs the script for those individuals.

The report lists people who are enrolled in more than one Main Fellowship organizations. It shows the organization the system counts as their Main Fellowship and another Main Fellowship in which they are also enrolled. There will be a report line for each additional Main Fellowship org. (So there will be multiple lines for a person who in enrolled in three or more - one line for each additional Main Fellowship.)

The recommended name is HasMultipleMainFellowships

Use the code below to create the SQL Script.

See How to create a SQL Script.

An obvious use of this report is to identify and, if appropriate, correct cases where a person is enrolled in multiple Main Fellowships organizations. But the report can also help in a couple of other ways:

  • Identify organizations that are incorrectly marked as Main Fellowship. When people are enrolled in multiple Main Fellowship organizations, it may indicate that some of the organizations have been inappropriately configured as Main Fellowship organizations.

  • Determine which Main Fellowship organization is considered by the system to be a person’s primary Main Fellowship. This organization will be in the report’s Primary MF column, and will be the org for which the attendance percentage is calculated for other reports, such as the Attendance (Main Fellowship) export on the blue Toolbar.

SQL Code for the Report

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
SELECT
    p.PeopleId,
    p.FirstName,
    p.LastName,
    LinkForNext = '/Org/' + CONVERT(VARCHAR, mf.OrganizationId),
    mf.OrganizationName [Primary MF],
    LinkForNext = '/Org/' + CONVERT(VARCHAR, o.OrganizationId),
    o.OrganizationName [Other MF]
FROM People p
JOIN dbo.TagPerson tp ON tp.PeopleId = p.PeopleId AND tp.Id = @qtagid
JOIN dbo.Organizations mf ON mf.OrganizationId = p.BibleFellowshipClassId
JOIN dbo.OrganizationMembers om ON om.PeopleId = p.PeopleId
JOIN dbo.Organizations o ON o.OrganizationId = om.OrganizationId AND o.IsBibleFellowshipOrg = 1
WHERE o.OrganizationId <> p.BibleFellowshipClassId
ORDER BY p.PeopleId


Latest Update

07/06/2020

Added this article.