Ideas

Add HeadofHouseholdId to Group in database

Note You are not authorized to edit this feature.

Add HeadofHouseholdId to Group in database

Reporting

Right now this is inefficient to do in SQL because it does a row-level lookup

```

SELECT TOP 1 p.[Id] 

       FROM 

        [Person] p

        INNER JOIN [GroupMember] gm ON gm.[PersonId] = p.[Id]

        INNER JOIN [GroupTypeRole] gtr ON gtr.[Id] = gm.[GroupRoleId]

       WHERE 

        gtr.[Guid] = '2639F9A5-2AAE-4E48-A8C3-4FFE86681E42' -- adult

        AND gm.[GroupId] = @UnitId

       ORDER BY p.[Gender]

```

And queries that need a HeadofHousehold could go much faster with that Id written to a table. Doesn't have to the Group table, just any table that relates Groups and HeadofHousehold

Photo of Josh CrewsSubmitted by Josh Crews, Simple  ·   ·  Reporting
Login to add a comment...

Submission Success Tips

Cultivate your ideas for maximum impact with these helpful submission tips that will increase the chances of your brilliant concepts becoming reality.

  • Clear Title: Craft a straightforward and descriptive title that instantly conveys the essence of your idea.
  • Concise Description: Provide an idea description that is succinct, ensuring it effectively communicates the concept without unnecessary verbosity.
  • Provide Additional Details: With a concise description complete, now provide any other details that are needed to better understand the requirements.
  • Thorough Ministry Need Review: Provide a comprehensive overview of the ministry need your idea addresses, emphasizing its significance.
  • Cover the WHY: Clearly articulate the rationale behind your idea, explaining why it's essential and how it aligns with the organization's goals and mission. Oftentimes a clear "why" sheds light into other possible options.