LST_CREATE
LST_CREATE actions
Function
Action creates a list of objects according to entered criteria.
Declaration
LST_CREATE mask, objType, logGroup, sortBy, lines, h, data[, relation, object]Parameters
mask | in | Identifier of the String type - loads only those object which have the attribute "Name" complying with mask. If symbol "*" is in the mask, objects are included into list regardless of their name ("Name" attribute). | ||||||||||||||||||
objType | in | Identifier of the Int type - defines a type of objects which will be included into the list (selection of the one of the predefined constants with prefix @OTYPE_*). | ||||||||||||||||||
logGroup | in | Reference to an object - if the current value of the parameter is non-associated alias, the parameter does not take it into account. If the parameter contains the reference to a real object in system, only objects, belonging to entered logical group, will be included into list. | ||||||||||||||||||
sortBy | in | Identifier of the Int type - defines a way to sort the objects in list (selection of the one of the predefined constants with prefix @SORT_LIST_*). | ||||||||||||||||||
lines | in | Identifier of the Int type - the maximum number of rows which will be written into data. It represents number of rows on one page. The maximum of rows can be 1000. | ||||||||||||||||||
h | out | Identifier of the Int type - unique handle on created list of objects. If the handle is 0, an error occurred at list creating. | ||||||||||||||||||
data | out | Identifier of the whole local structure SD._System_ObjectInfo or other structure definition consisting of the same column count and types. Types and meaning of columns:
It is possible to use a structure extended by 2 more columns with their types and meanings:
| ||||||||||||||||||
relation | in | Identifier of the Int type - defines the relationship among all objects in list in regard to object characterized by the parameter object. | ||||||||||||||||||
object | in | Reference to optional object - relative object. |
Description
Action creates the list of objects according to entered criteria. If the handle is 0, an error occurred at list creating.
The list belongs to a running script instance and it cannot be shared among various scripts. The list terminates together with script ending or by LST_CLOSE action.
Note
It is able to access the current values of objects which are loaded within the *current* page by the actions LST_CREATE, LST_GO_NEXT, ... The action ON CHANGE reacts to changes in object values. When the list is closed, or when page number is changed, only the most recent values are accessible and the ON CHANGE action stops responding to value changes.
; Spracovanie zmeny hodnoty
PROCEDURE ChangeProc(IN INT _v, IN ALIAS _a, IN INT _row, _col)
_c := _v
END ChangeProc
INT _h ; identifikátor zonamu
INT _hbj ; identifikátor prvého objektu zo stránky
ENTRY GO_OnClick
ALIAS _a
RECORD NOALIAS (SD._System_ObjectInfo) _data
; otvorenie zoznamu a načítanie prvej stránky
LST_CREATE "Sec", @OTYPE_ALL_TYPES, (0), @SORT_LIST_NAME, 1000, _h, _data
; Prístup k aktuálnej hodnote objektu zo stránky
_hbj := _data[1]^ID
SET _a AS (_hbj)
_value := _a
; Registrácia procedúry
ON CHANGE (_hbj) GOTO ChangeProc
END GO_OnClick
; zatvorenie zoznamu
ENTRY GO_CLOSE_OnClick
LST_CLOSE _h
END GO_CLOSE_OnClickRelated pages: