Instant Family Reps Plugin

One of my favorite t-sirts exclaims "Go away or I will replace you with a very small shell script". This is how I feel about the family_rep field in PowerSchool. Does anyone really keep it up to date properly? And if you don't, aren't families at risk of missing that important mailing?
This plugin eliminates the need to manually maintain family reps.

How Does it work?
When in the DISTRICT OFFICE a link "Select District Family Reps" appears after Stored Selections on the admin homepage. This links to a familyreps.html page that picks the youngest student at each household for the entire district BASED ON HOME PHONE NUMBER. The family reps become the current selection and you are redirected to the group functions screen.
When your in a SCHOOL the link changes to "Select [school abbreviation] Family Reps" and finds the family reps at each household just within the school.
NEW in version 4.1: The option to select family reps from within your current selection of students!
The SQL query does take into account students who are checkmarked as a family_rep on the Modify Info screen. Those checked always get included in the student selection. This is to account for those rare instances where two or more students have the same home phone but still need individual copies of all school mailings.
Twins and triplets are taken into account when selecting family reps. Students with blank home phone numbers are also included automatically.

- Your school may have different way of determining student family representatives. This will only be a replacement for schools that group households by home phone.
- The home_phone field will have to be uniformly formatted for every student or this will not work. We use data validation to prevent the home_phone from being submitted if it is malformed.
- This customization assumes that you have run the student core fields migration to database extensions. If you have not migrated, you can go to the admin/familyreps.html and admin/familyrepscur.html pages in CPM and change the way the SQL is pulling family_rep.
- If you plan on using this customization in production you should clear the family_rep field for every student EXCEPT for students who are not the youngest of the household but still need a copy of mailers (as noted earlier).

Version History:

4.3 - Removed a problematic [if] tag on the admin home page fragment.
4.2 - Refined the SQL query because once again sometimes oldest sibling was selected rather than youngest! Gees Nick get it together!
4.1 - Added the option to select family reps from within your current student selection. Fixed a problem where the oldest student was selected family rep instead of the youngest. Converted to a plugin for installation. SQL query now pulls family_rep field from "studentcorefields" table.
4.0 - Converted home page link to page fragment and therefore PS version 8 ready.
3.3 - Minor update to accommodate changes in PS version 7.8.2.
3.2 - Fixed a screw up that broke the district family rep function.
3.1 - Minor update to accommodate changed in PS version 7.8.
3.0 - Moved the sql onto it's own page to avoid the admin home page having to run the script on load. Altered the selection proccess to take twins/triplets into account. Family reps now include any student with a blank home_phone field.
2.2 - Updated for PowerSchool version 7.2.x.
2.1 - Updated for PowerSchool version 7.1 admin homepage changes.  Corrected a CSS glitch. Corrected a SQL glitch that would not select the correct school. Corrected the zip file structure to work properly when imported via CPM.
1.0 - Initial release

Powerschool Type: