GlideRecord - hasNext()

Determines if there are any more records in the GlideRecord.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
Boolean True if there are more records in the query set.

Scoped equivalent

To use the hasNext() method in a scoped application, use the corresponding scoped method: Scoped GlideRecord - hasNext().

if (gr.hasNext()) {
  dothis(); // found it, do it
} else {
  dothat(); // didn't find it