To create an EWD Session ResultSet within a back-end Caché script:

  d deleteFromSession^%zewdAPI("searchResults",sessid)
  s propsArray("name")="Rob"
  s propsArray("town")="Reigate"
  s propsArray("country")="UK"
  d mergeRecordArrayToResultSet^%zewdAPI("searchResults",.propsArray,sessid)
  s propsArray("name")="Chris"
  s propsArray("town")="Banstead"
  s propsArray("country")="UK"
  d mergeRecordArrayToResultSet^%zewdAPI("searchResults",.propsArray,sessid)
  ...etc

This would create an EWD Session ResultSet named searchResults. EWD Session ResultSets can be much clearer and simpler to use in EWD Pages than EWD Session Arrays, particularly when using complex data for each array record. For example, the ResultSet shown above could be used and displayed within an EWD page as follows:

  <ewd:forEach sessionName="searchResults" index="$recNo">
    <tr>
      <td><?= #searchResults[$recNo].name ?></td>
      <td><?= #searchResults[$recNo].town ?></td>
      <td><?= #searchResults[$recNo].country ?></td>
    </tr>
  </ewd:forEach>