Yeah, unfortunately that didn't print out anything.



Here's the actual code I'm using (in full).   Please take note of the very end where I use


document.getElementById('${uid}').innerHTML = ${numb};



For some reason, it's only working on 1 user and the rest are blank.



<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">



      <g:evaluate jelly="true">


              var gr = new GlideRecord('sys_user_grmember');


              gr.addQuery('group', '8a4cd5b36fd3d1000fd9122cbb3ee48f'); // "Service Desk" group sys_id.


              gr.orderBy('user.name');


              gr.query();


             


              var gdt = new GlideDateTime();


              var month = gdt.getMonth();


              var year = gdt.getYear();


              var day = gdt.getDayOfMonth();


             


              var gr2 = new GlideRecord('u_round_robin');


              gr2.addQuery('u_year', year);


              gr2.addQuery('u_month', month);


              gr2.addQuery('u_day_of_month', day);


              gr2.query();


             


              var usrAry = [];


             


              while (gr2.next())


              {


                      usrAry.push({ id: gr2.u_user_sys_id, num: gr2.u_daily_tickets_assigned });


              }


      </g:evaluate>


     


      <script>


              var activeCount = 0;


              var inactiveCount = 0;


             


              function add(val)


              {


                      if (val == "a")


                              activeCount++;


                      else if (val == "i")


                              inactiveCount++;


              }


      </script>



      <style>


              .trHover tr:hover td {background:#d7d7d7}


      </style>


              <table class="trHover">


                      <div id="stats">


                      </div>


                      <tr>


                              <td>


                                      <span style="text-decoration: underline;">Technician</span>


                              </td>


                              <td>


                                      <span style="text-decoration: underline;">#</span>


                              </td>


                              <td>


                                      <span style="text-decoration: underline;">Last ticket assigned</span>


                              </td>


                      </tr>


                      <j:while test="${gr.next()}">


                              <tr>


                                      <td>


                                              <a target="_top" href="nav_to.do?uri=sys_user.do?sys_id=${gr.user.sys_id}">


                                                      <j:if test="${gr.user.u_round_robin_active}">


                                                              <span style="background-color: #5CE65C;font-weight: bold;">${gr.user.name}</span>


                                                              <script> add("a"); </script>


                                                      </j:if>


                                                      <j:if test="${!gr.user.u_round_robin_active}">


                                                              <i>${gr.user.name}</i>


                                                              <script> add("i"); </script>


                                                      </j:if>


                                              </a>


                                      </td>


                                      <td width="10">


                                              <span id="${gr.user.sys_id}"></span>


                                      </td>


                                      <td>


                                              <j:if test="${gr.user.u_round_robin_active}">


                                                      (${gr.user.u_last_ticket_assigned.getDisplayValue()})


                                              </j:if>


                                              <j:if test="${!gr.user.u_round_robin_active}">


                                                      &#160;


                                              </j:if>


                                      </td>


                              </tr>


                      </j:while>


      </table>


             


      <script>


              var tot = activeCount + inactiveCount;


              document.getElementById("stats").innerHTML = "On:&#160;" + activeCount + "&#160;&#160;&#160;Off:&#160;" + inactiveCount + "&#160;&#160;&#160;Total:&#160;" + tot + "<br /><i>(color indicates Round Robin is activated)</i><br /><br />";


      </script>


     


      <j:forEach var="jvar_word" items="${usrAry}">


              <g:evaluate var="jvar_numb" jelly="true" expression="var numb = jelly.jvar_word.num; numb;" />


              <g:evaluate var="jvar_uid" jelly="true" expression="var uid = jelly.jvar_word.id; uid;" />


                      <script>


                              document.getElementById('${uid}').innerHTML = ${numb};


                      </script>            


      </j:forEach>


     


     


</j:jelly>






Here's the output:


Screen Shot 07-21-15 at 09.47 AM.JPG



Notice the "6" after Marci.   I have no idea why this is the ONLY one that shows up.