VBA APIs to extract data on forms
TGK_isAdHocTemplate
| Element | Description |
|---|---|
| Syntax | dim bRes as boolean bRes = Application.run("Tgkrmacro.xlam!TGK_isAdHocTemplate", WORKBOOK) |
| Description | Determines whether the specified form is an ad hoc form template. |
| Parameters | - WORKBOOK. Workbook object corresponding to the form to be checked. |
| Value returned | TRUE if the current form is the structure of an ad hoc form; FALSE otherwise. |
TGK_isNavigated
| Element | Description |
|---|---|
| Syntax | dim bRes as boolean bRes = Application.run("Tgkrmacro.xlam!TGK_isNavigated", WORKBOOK) |
| Description | Determines whether the specified form is a form open in navigation mode. |
| Parameters | - WORKBOOK. Workbook object corresponding to the form to be checked. |
| Value returned | TRUE if the current form is a form open in navigation mode; FALSE otherwise. |
TGK_isAdHocNavigated
| Element | Description |
|---|---|
| Syntax | dim bRes as boolean bRes = Application.run("Tgkrmacro.xlam!TGK_isAdHocNavigated", WORKBOOK) |
| Description | Determines whether the specified form is an ad hoc form template open in navigation mode. |
| Parameters | - WORKBOOK. Workbook object corresponding to the form to be checked. |
| Value returned | TRUE if the current form is an ad hoc form open in navigation mode; FALSE otherwise. |
TGK_isDataEntry
| Element | Description |
|---|---|
| Syntax | dim bRes as boolean bRes = Application.run("Tgkrmacro.xlam!TGK_isDataEntry", WORKBOOK) |
| Description | Determines whether the specified form is a form open in Data Entry mode. |
| Parameters | - WORKBOOK. Workbook object corresponding to the form to be checked. |
| Value returned | TRUE if the current form is a form open in Data Entry mode; FALSE otherwise. |
TGK_isReport
| Element | Description |
|---|---|
| Syntax | dim bRes as boolean bRes = Application.run("Tgkrmacro.xlam!TGK_isReport", WORKBOOK) |
| Description | Determines whether the specified workbook is a form. |
| Parameters | - WORKBOOK. Workbook object corresponding to the form to be checked. |
| Value returned | Determines if the specified workbook is a form; FALSE otherwise. |
TGK_getReportCode
| Element | Description |
|---|---|
| Syntax | dim sCodice as string sCodice = Application.run("Tgkrmacro.xlam!getReportCode", WORKBOOK) |
| Description | Determines the code of the form associated with the workbook processed as an argument. |
| Parameters | - WORKBOOK. Workbook object corresponding to the form whose code is to be obtained. |
| Value returned | Form code or an empty string if the form is ad hoc or the specified workbook is not a form. |
TGK_getReportProcess
| Element | Description |
|---|---|
| Syntax | dim sCodice as string sCodice = Application.run("Tgkrmacro.xlam!getReportProcess", WORKBOOK) |
| Description | Determines the code of the process on which the user is performing data entry via the form specified as an argument. |
| Parameters | WORKBOOK: Workbook object corresponding to the form whose code is to be obtained. |
| Value returned | Process code or an empty string if the form is not open in data entry mode. |
TGK_getUserName
| Element | Description |
|---|---|
| Syntax | dim sCodice as string sCodice = Application.run("Tgkrmacro.xlam!getUserName") |
| Description | Determines the name of the current user. |
| Parameters | None |
| Value returned | Current user name or an empty string if the user has not logged in. |
TGK_getReportCodes
| Element | Description |
|---|---|
| Syntax | dim arrCodici arrCodici = Application.run("Tgkrmacro.xlam!getReportCodes", [COD_NODO], [COD_PROCESSO], [COD_FASE]) |
| Description | Determines the list of codes identifying the forms related to a given node of the group of forms in the dimensions tree. |
| Optional parameters | - COD_NODO: If this parameter is specified and not an empty string, the function returns a list of codes identifying the forms related to the node, otherwise it returns a list of codes identifying all forms related to the nodes of the group of forms in the dimensions tree. - COD_PROCESSO: If this parameter is specified and not an empty string, the search is limited to the forms visible in the dimensions tree for the specified process. - COD_FASE: If this parameter is specified and not an empty string, the search is limited to the forms visible in the dimensions tree for the specified COD_PROCESSO process and for the specified step. |
| Values returned | List of codes of the related forms. |
Example
This example shows the syntax for obtaining a list of codes of the forms related to node "001" for process "ACT2007":
dim arrCodici
arrCodici = Application.run("Tgkrmacro.xlam!getReportCodes", "001", "ACT2007")
for i = lbound(arrCodici) to ubound(arrCodici)
MsgBox "Form: " + cstr(arrCodici(i))
next i
TGK_getFilters
| Element | Description |
|---|---|
| Syntax | dim filters as String dim cella as range set cella = .... filters = Application.run("Tgkrmacro.xlam!TGK_getFilters", cella) |
| Description | Obtains the set of filters that affect a certain cell or a certain range of cells and returns their expression in accordance with the corresponding human-readable syntax. |
| Parameters | - CELL. Individual cell or range from which to read filters. |
TGK_getParameters
| Element | Description |
|---|---|
| Syntax | dim parameters as String parameters = Application.run("Tgkrmacro.xlam!TGK_getParameters") |
| Description | Set of run parameters of the current form |
| Value returned | Returns the expression in accordance with the corresponding human-readable syntax. Note: also functions on cells of matrices containing field expressions. |