title: how to store a list of items in Gel Script
body: <p>I would like to create a process in Clarity 13.1 which sends an email to all managers belonging to different OBS units in IT Department containing the list of resources who did not complete their timesheet + the related time periods. (I did not copy all the codes here, sorry if it is still too long)</p>
  
  <p>First, I wrote a query to select all the managers that I needed and the result is stored in var= "result3".</p>
  
  <p>Then I wrote this:</p>
  
  <pre><code>&lt;core:forEach items="${result3.rowsByIndex}" trim="true" var="mng"&gt;
   &lt;core:set value="${mng[0]}" var="userid"/&gt; 
  &lt;core:set value="${mng[1]}" var="ManagerLastName"/&gt;
   &lt;core:set value="${mng[2]}" var="ManagerFirstName"/&gt;
   &lt;core:set value="${mng[3]}" var="ManagerEmail"/&gt;
   &lt;core:set value="${mng[4]}" var="idManager"/&gt;
   &lt;gel:log&gt; manager ${mng[1]} &lt;/gel:log&gt;
  </code></pre>
  
  <p>Next I selected all the resources who did not compile their timesheet and the result is stored in result2.
  and this is the last part:</p>
  
  <pre><code>&lt;core:forEach items="${result2.rowsByIndex}" trim="true" var="tms"&gt;
   &lt;core:set value="${tms[0]}" var="id_risorse"/&gt;
   &lt;core:set value="${tms[1]}" var="Full_Name"/&gt;
   &lt;core:set value="${tms[2]}" var="Email"/&gt;
   &lt;core:set value="${tms[3]}" var="Time_Period"/&gt;
   &lt;core:set value="${tms[4]}" var="Prid"/&gt;
   &lt;core:set value="${tms[5]}" var="MANAGER_ID"/&gt;
  
  &lt;gel:log&gt; Risorsa: ${tms[1]} periodo: "${tms[3]}"&lt;/gel:log&gt; 
  
  &lt;gel:email from="clarity@mediobanca.it"
   subject="MISSING TIMESHEET: ${tms[3]}"
   to="${mng[3]}"&gt;
  
   ( Here is the CONTENT OF EMAIL
   Resource: ${tms[1]}, id= "${tms[0]}" 
  
   &lt;/gel:email&gt; 
  
  &lt;/core:forEach&gt; 
  &lt;/core:forEach&gt; 
  &lt;/core:forEach&gt; 
  &lt;/gel:script&gt;
  </code></pre>
  
  <p>Here, the problem is that in this way, each manager receives lot of email related to each resource or each time period, while each manager must receive ONLY 1 email containing the LIST OF RESOURCES ...</p>
  
  <p>I tried also putting the last two  after 
  
  <p>I do appreciate if someone knows if it is possible to refer to the list of resources inside gel:email and how? or if I could write a loop inside a gel:email.</p>
  
  <p>any answer or idea is highly appreciated.</p>
  
  <p>Many thanks,</p>
  
  <p>Mona </p>