Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

control​.addRecordToTop()

  • Last UpdatedJun 25, 2024
  • 1 minute read

Use addRecordToTop() method to add a record at the top of the existing records on the Base Form.

Syntax

// B1 is a Base Form object.

B1.addRecordToTop(object);

or

B1.addRecordToTop();

Parameters

Parameter

Description

object

Record to add.

This parameter is optional.

Return Value

This method returns the new record added.

Example

// Define a record to add.

var dataObj = { Name:"Kevin",Address:"Park Street 1" };

// Define a Base Form object.

var B1 = control.findById("B1");

// Add the record to the Base Form.

B1.addRecordToTop(dataObj);

// or B1.addRecordToTop();

Note: If you use this method to add a record using scripts for the On Record Add property of the Base Form, then at run-time a recursive loop will cause the browser to stop responding.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in