"ARRAY" OBJECT CODE
Introduced in API Version 2.8.1
Object code format
[parent_object.]ARRAY[{selector}].[property]
Possible parent objects | Example |
|
---|---|---|
<none> |
| Returns the number of rows of the ARRAY where the OBJECT CODE is evaluated. The OBJECT CODE must be invoked from an ITEM belonging to an ARRAY, otherwise the evaluation will return NULL. |
| Returns the number of rows of the ARRAYs with ITEM_CODE="Y". The ARRAYs will be searched in the FORMs with FORM_CODE=”X” of the active ADMISSION | |
| Returns the number of rows of the ARRAYs with ITEM_CODE="Y". The ARRAYs will be searched in all FORMS contained in TASKs with TASK_CODE=”X” of the active ADMISSION | |
| Returns the number of rows of the ARRAYs with ITEM_CODE="Y". The ARRAYs will be searched in all FORMS of the active ADMISSION |
Selector
This OBJECT CODE supports adding a selector (optional).
If no selector is provided in the OBJECT CODE expression (e..g. ARRAY.ROW_COUNT), then the ARRAY used to calculate the properties is the one in the active context. This only makes sense when the ITEM in the active context belongs to an array.
If provided, the selector must be an ITEM_CODE, because the arrays are defined in the FORM TEMPLATES as an ITEM of type “ARRAY”
Context information
The context in which the OBJECT CODE is evaluated depends on the parent indicated in the expression.
If no parent is specified (e..g.
ARRAY.ROW_COUNT
/ARRAY{PARTIAL_STEPS}.REF
): only the ARRAY in the active FORM is considered. If no selector is provided in the OBJECT CODE expression (e..g.ARRAY.ROW_COUNT
), then the ARRAY used to calculate the properties is the one to which the active ITEM belongs (the ITEM it must be part of an array). Otherwise the ARRAY of the active FORM that corresponds to the desired selector will be usedIf some parent specified (e.g.
ADMISSION.ARRAY{PARTIAL_STEPS}.ROW_COUNT
): The ARRAYs used to evaluate the OBJECT CODE will be obtained from the parent’s context
Examples:
ARRAY.ROW_COUNT
: Returns the number of rows of the ARRAY to which the active ITEM belongs.ARRAY{PARTIAL_STEPS}.REF
: Returns the number of rows of the ARRAY namedPARTIAL_STEPS
of the active FORM.ADMISSION.ARRAY{PARTIAL_STEPS}.REF
: Returns the number of rows of all the ARRAYs namedPARTIAL_STEPS
of the active ADMISSION (same as the previous point)
Properties
PROPERTY | DESCRIPTION |
---|---|
| Returns an object that represents the ARRAY. This object is intended to be used in REPORT TEMPLATES The properties of the object can retrieved from a REPORT TEMPLATE by means of the TWIG function ocGet() REPORT function This is the default property if no one is specified |
| Number of rows of the ARRAY |
| Title of the ARRAY |
| Provides access to the row number # of the array. If no row number is provided, all rows will be used |