Skip to main content
Version: 10.1

Rows.mark()

note

This article is about the mark() function of the Rows object.

Rows.mark()

1.Checks if the first record in the Rows object is marked or not.

2.Changes the mark value of one or more records.

Returns the mark value of the first row object in the Rows object if checking (no. 1). Returns the ‘this’ object if marking (no. 2).

Syntax

*rows*.mark( *value* )
  • Omit value if you want to check if the first record in the Rows object is marked or not (Example 1).
  • Specify value if you want to change the mark value of one or more records (Example 2).

If specified, value is either a boolean or the string ‘toggle’ and has the following data type and meaning:

ValueData typeMeaning
truebooleanMarks all records in scope
falsebooleanUnmarks all records in scope
togglestringToggles the mark value of all records in scope

Example 1

This example assigns the mark value (true or false) of the current record to the mark variable:

var mark = $.udb('EMP').rows('current').mark();

Example 2

These examples change the mark value of one or more records:

$.udb('EMP').rows().mark(true);      // Mark all queried records

$.udb('EMP').rows(5).mark(false); // Unmark the 6th record