Skip to main content
Version: 5.x

ACTIVATE operator

The ACTIVATE operator creates an action that activates a specified form, tab, property, or action on a form

Syntax

ACTIVATE FORM formName
ACTIVATE TAB formName.componentSelector
ACTIVATE PROPERTY formPropertyId

Description

The ACTIVATE operator creates an action that activates a form, a tab, a property or an action on a form.

Parameters

Examples

//Form with two tabs
FORM myForm 'My form'
OBJECTS u = CustomUser
PROPERTIES(u) name

OBJECTS c = Chat
PROPERTIES(c) name
;

DESIGN myForm {
NEW tabbedPane FIRST {
type = TABBED;
NEW contacts {
caption = 'Contacts';
MOVE BOX(u);
}
NEW recent {
caption = 'Recent';
MOVE BOX(c);
}
}
}

testAction() {
ACTIVATE FORM myForm;
ACTIVATE TAB myForm.recent;
}

CLASS ReceiptDetail;
barcode = DATA STRING[30] (ReceiptDetail);
quantity = DATA STRING[30] (ReceiptDetail);

FORM POS
OBJECTS d = ReceiptDetail
PROPERTIES(d) barcode, quantityGrid = quantity
;

createReceiptDetail 'Add sales line'(STRING[30] barcode) {
NEW d = ReceiptDetail {
barcode(d) <- barcode;
ACTIVATE PROPERTY POS.quantityGrid;
}
}