AnsweredAssumed Answered

need to sort this date wise

Question asked by akhan.1 on Mar 4, 2014
Latest reply on Mar 5, 2014 by Tom_Kouhsari

hi there, i want to sort this date wise below is the script. when it repeats it sort on date in ascending order. these are the comments i am getting from IRF and passing to second IRF as previous comments, i want set sort order as per date.

 

//EU comments start
if ( Process.approverCommentsEU != null ) {
  Form.PrevComment += "<br /><br /><b>EU Comments : </b><br />";
  for (var i = 0; i < Process.approverCommentsEU.length; i++) {
    if ( Process.approverCommentsEU[i] != "" ) {
        Form.PrevComment += "<br />Name: " + Process.EUName;
      Form.PrevComment += "<br />Remarks: " + Process.approverCommentsEU[i];
       Form.PrevComment += "<br />Time Stamp: " + Process.DateEU;
    }
  }
}
//EU comments end

Outcomes