arc:last

Version 20.0.7488


arc:last

Version 20.0.7488


ArcScript keywords within the scope of the arc:last keyword will only be executed after the last item is encountered and only if there were items returned by arc:call or arc:enum.

An arc:last statement is executed only after the last item is processed; it maintains access to the last item in the feed. If the scope has no items, then neither arc:first nor arc:last are executed.

Parameters

None

Control Attributes

None

Examples

Create an HTML table from a feed where each item is represented as a row:

<arc:call op="listCustomers">
  <arc:first>
    <table>
    <thead>
      <arc:enum item="customer">
        <td>[_attr]</td>
      </arc:enum>
    </thead>
  </arc:first>
  <tr>
    <arc:enum item="customer">
      <td>[_value]</td>
    </arc:enum>
  </tr>
  <arc:last>
    </table>
  </arc:last>
</arc:call>

See Also

  • arc:first: Execute a code block only for the first iteration.