getOccurrence()

Returns the nthuniface.Occurrence object of the uniface.Entity object.

Return=EntityObject.getOccurrence(SequenceNumber)

Arguments

SequenceNumber—the requested occurrence number, starting with 0 (as is customary in Javascript).

Return value

Returnuniface.Occurrence object of this Entity that has the specified sequence number, or null if this Entity has no such occurrence.

Exceptions

The following exceptions may be thrown:

Example: JavaScript Data Addressing API

var vInstance = uniface.getInstance("MUSICLIST");
if (vInstance != null) {
  var vEntity = vInstance.getEntity("ITEMS.MUSICSHOP");
  if (vEntity != null) {
     var vOccs = vEntity.getOccurrences();
     for (var i =  0; i < vOccs.length; i++) {
	doSomethingWithOccurrence(vOccs[i]);
     }
     var vOcc = vEntity.getOccurrence(4);
     if (vOcc) {
        alert (vOcc + " has status " + vOcc.getStatus());
     }
  }
}

Related Topics