Using “current selection” of students in PowerSchool custom pages

I didn’t come up with this one on my own (big shout-out to Roger from the PowerSource forums), but I wanted to document how you use a “current selection” of students in the PowerSchool custom page:

~[tlist_sql; SELECT st.dcid, st.last_name, st.first_name, st.grade_level
FROM Students st
INNER JOIN ~[temp.table.current.selection:students] stusel
ON stusel.dcid = st.dcid ]<div class=”photo_box”>
<a href=”../stp/~(dcid)ph.jpeg” target=”_blank”>
<img src=”../stp/~(dcid)ph.jpeg” width=”100″ border=”0″ /></a>
<br clear=”both” />
<strong>~(last_name), ~(first_name)</strong>: ~(grade_level)</div>[/tlist_sql]
The current selection (in bold) can be joined in the SQL query to the students table.

Random P.S. I’m referencing here the student photo by exact location. There is a way to reference it indirectly as a variable (instead of directly by filename), but then the photo is reduced in size. Since the raw photos aren’t that large, I prefer to load the entire raw photo. Here’s how you reference it indirectly:

<span class=”account-photo”>~[studenttitlephoto]</span>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.