4D v13.4

METHOD Get path

Home

 
4D v13.4
METHOD Get path

METHOD Get path 


 

METHOD Get path ( methodType {; aTable}{; objectName{; formObjectName}}{; *} ) -> Function result 
Parameter Type   Description
methodType  Longint in Object type selector
aTable  Table in Table reference
objectName  Text in Name of form or database method
formObjectName  Text in Name of form object
Operator in If passed = command applies to host database when executed from a component (parameter ignored outside of this context)
Function result  Text in Full path of object

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 Longint 2 Path of database methods specified (English name). 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]/onServerOpenConnexion
[databaseMethod]/onServerCloseConnection
[databaseMethod]/onSystemEvent
[databaseMethod]/onSqlAuthentication
Path Project form Longint 4 Path of project form methods and all their object methods. Examples:
[projectForm]/myForm/{formMethod}
[projectForm]/myForm/button1
[projectForm]/myForm/my%2list
[projectForm]/myForm/button1
Path Project method Longint 1 Name of method.
Example: MyProjectMethod
Path Table form Longint 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/my%2list
[tableForm]/table_2/Form1/my%2list
Path Trigger Longint 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 objectaTableobjectNameformObjectName
Path Project formXX (optional)
Path Table formXXX (optional)
Path Database methodX
Path Project methodX
Path TriggerX

If the object is not found (method type unknown or not valid, missing table, etc.), an error is generated.

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")

 
PROPERTIES 

Product: 4D
Theme: Design Object Access
Number: 1164

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Created: 4D v13

 
SEE ALSO 

Current method path
METHOD OPEN PATH
METHOD RESOLVE PATH