METHOD Get path
METHOD Get path ( methodType {; aTable}{; objectName{; formObjectName}}{; *} ) : Text
Parameter | Type | Description | |
---|---|---|---|
methodType | Integer | → | Design object type selector |
aTable | Table | → | Table reference |
objectName | Text | → | Name of form or method |
formObjectName | Text | ← | Name of form object |
* | Operator | → | If passed = command applies to host database when executed from a component (parameter ignored outside of this context) |
Function result | Text | ← | Full path of object |
This command is not thread-safe, it cannot be used in preemptive code.
Description
The METHOD Get path command returns the full internal pathname of a method.
In the methodType parameter, you pass the type of method whose path you want to get. You can use the following constants, found in the Design Object Access theme:
Constant | Type | Value | Comment |
---|---|---|---|
Path database method | Integer | 2 | Path of database methods specified. List of these methods: [databaseMethod]/onStartup [databaseMethod]/onExit [databaseMethod]/onDrop [databaseMethod]/onBackupStartup [databaseMethod]/onBackupShutdown [databaseMethod]/onWebConnection [databaseMethod]/onWebAuthentication [databaseMethod]/onWebSessionSuspend [databaseMethod]/onServerStartup [databaseMethod]/onServerShutdown [databaseMethod]/onServerOpenConnection [databaseMethod]/onServerCloseConnection [databaseMethod]/onSystemEvent [databaseMethod]/onSqlAuthentication [databaseMethod]/ onHostDatabaseEvent [databaseMethod]/ onRESTAuthentication [databaseMethod]/ onMobileAppAuthentication [databaseMethod]/ onMobileAppAction |
Path project form | Integer | 4 | Path of project form methods and all their object methods. Examples: [projectForm]/myForm/{formMethod} [projectForm]/myForm/button1 [projectForm]/myForm/mylist [projectForm]/myForm/button1 |
Path project method | Integer | 1 | Name of method. Example: MyProjectMethod |
Path table form | Integer | 16 | Path of table form methods and all their object methods. Example: [tableForm]/table_1/Form1/{formMethod} [tableForm]/table_1/Form1/button1 [tableForm]/table_1/Form1/mylist [tableForm]/table_2/Form1/mylist |
Path trigger | Integer | 8 | Path of database triggers. Example: [trigger]/table_1 [trigger]/table_2 |
Pass values in the aTable, objectName and formObjectName parameters according to the type of object for which you want to get the method pathname:
Type of object | aTable | objectName | formObjectName |
---|---|---|---|
Path Project form | X | X (optional) | |
Path Table form | X | X | X (optional) |
Path Database method | X | ||
Path Project method | X | ||
Path Trigger | X |
Note: The command does not check if the method actually exists in the database. An error is generated only when an invalid database method name is passed with the Path database method selector.
If the command is executed from a component, it returns by default the paths of the component methods. If you pass the * parameter, the array contains the paths of the methods of the host database.
Example
//Retrieval of the pathname of the "On Startup" database method:
$path:=METHOD Get path(Path database method;"onStartup")
//Retrieval of the pathname of the trigger for the [Employees] table:
$path:=METHOD Get path(Path trigger;[Employees])
//Retrieval of the pathname of the "OK" object method of the "input" form for the [Employees] table:
$path:=METHOD Get path(Path table form;[Employees];"input";"OK")