ISML Function - hasNext()

Name

hasNext()

Short Description

checks whether the iterator instance currently used in a loop contains any elements

Table of Contents

Product Version

6.5

Product To Version

 

StatusNew Labels

Introduction

The ISML function hasNext() allows you to check whether the iterator instance currently used in a loop contains any elements. This is useful, for example, in case the last loop element requires special treatment.

Syntax

hasNext( <loop iterator identifier> )

Example

<ISLOOP iterator="foo">
  ...
  <ISIF condition="#hasNext(foo)#">
    ... (do something except for last line)
  </ISIF>
  ...
</ISLOOP>

Note

If an alias name has been defined for the iterator, this alias has to be used for hasNext() as well.

Reference - ISML Functions

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

The Intershop Customer Support website uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties.

Further information on privacy can be found in the Intershop Privacy Policy and Legal Notice.
Customer Support
Knowledge Base
Product Resources
Tickets