ProApp Designer - Release 14.10 (Package 32)

OnInsert Event

The OnInsert event is triggered after an item has been inserted into a collection control. The event handler receives the details of the inserted item through the eventData object, which is available within the scope of the event handler code.

// Accessing data of inserted item

const insertedItemCount = eventData.length;
for (let i = 0; i < insertedItemCount; i++) {

// accessing data of selected item

const relationshipId = eventData[i].getItemId();
const relatedItemId = eventData[i].getRelatedId();
const partWeight = eventData[i].getValue(“weight”);

// setting a cell value on inserted item

eventData[i].setValue(“classification”, “item”);
}