Instant Family Reps

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. Since all my district was doing to figure out which students where family reps was grouping the home_phone field and picking the youngest student within each group... I replaced this process with a small SQL query.
How Does it work?
When in the DISTRICT OFFICE a link "Select District Family Reps" appears under Other Options on the admin homepage. When the link is clicked a SQL query runs which 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 taken to the group functions screen where you would print a report or mailing label, etc.
When your in a SCHOOL the link changes to "Select School Family Reps" and finds the family reps at each household just within the school.
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.

THIS CUSTOMIZATION IS NOT FOR EVERYONE. BEFORE DEPLOYING PLEASE NOTE:
- 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 form validation to prevent the home_phone from being submitted if it is malformed (Check out The Big Registration screen for an example).
- 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).
- If you have implemented other customizations to the admin homepage (many people do) you will have to merge this customization with the others you are using.

Installation:

CUSTOM WEB_ROOT METHOD: Download and unzip the Instant_Family_Rep_v1.zip file. Copy the home.html page to powerschool folder/data/custom/web_root/admin/  on your server. Clear the family_rep field for all students as explained above.

CUSTOM PAGE MANAGEMENT METHOD: Use the CPM interface to upload the Instant_Family_Rep_v1.zip as is without unzippng it. (download Pearson's guide to CPM). Clear the family_rep field for all students as explained above.

Version History:

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