arc:last

Version 24.3.9106


arc:last


ArcScript keywords within the scope of the arc:last keyword are only executed after the last item is encountered, and only if items were 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, neither arc:first nor arc:last is executed.

Parameters

None

Control Attributes

None

Example

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.