Showing student custom field data in classattendance page in PowerSchool Teachers

I was trying to display some custom field data (I will take ssis_student_nickname as an example in this article) in the classattendance.html page in PowerSchool Teachers. But, to be honest, I'm not sure about the customization syntax of PowerSchool. I couldn't make it work with this following syntax:




As fas as I acknowledged, the classattendance page accessing the attendance database using some javascript. So, in the end, I have to do some hack to display the custom field in that page. Here is the details:

1. Add an additional column in the page, and name it:
             <th align="left" class="cvDemarcation">~[text]psx.html.teachers.classattendance.students[/text]</th>
            <th class="cvDemarcation">Student Nick Name</th>
            <tr class="studentrow">
                <td class="cvDemarcation ssis-name">~[ATT_RecordMeetingTeacherStudentList][studentname]</td>
                <td class="cvDemarcation ssis-nickname"></td>
                <td class="cvDemarcation">[alert]</td>

We will put data into ssis-nickname td tag.

2. Use tlist_sql to load the custom field data of all the students and put it into a hidden table:

<table id="ssis-ncklist" style="display:none;">
    ~[tlist_sql; SELECT s.lastfirst as lf, u.ssis_student_nickname as nckname
FROM students s INNER JOIN u_studentsuserfields u
WHERE s.enroll_status = 0; ]
<td class="ssis-lf">~(lf)</td>
<td class="ssis-nck">~(nckname)</td>

I use this as a psudo database table and query the nickname from that (use lastfirst as keys) using jQuery.

3. Add this javascript snippet at the end of the file to manipulate the custom field data and put them into the attendance table (in step 1):

function get_nickname(ssislastfirst) {
var nickname = '';
if(jQuery(this).html() == ssislastfirst) {
nickname = jQuery(this).next().html();
return nickname;
var lastfirst = jQuery(this).html();
var nickname = get_nickname(lastfirst);

You can find the full page here:

Awesome huh?