4D v15METHOD GET ATTRIBUTES |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v15
METHOD GET ATTRIBUTES
|
METHOD GET ATTRIBUTES ( path ; attributes {; *} ) | ||||||||
Parameter | Type | Description | ||||||
path | Text, Text array |
![]() |
Method path(s) | |||||
attributes | Object, Object array |
![]() |
Attribute(s) for selected method(s) | |||||
* | Operator |
![]() |
If passed = command applies to host database when executed from a component (parameter ignored outside of this context) | |||||
Theme: Design Object Access
The new METHOD GET ATTRIBUTES command returns, in attributes, the current value of all attributes for the method(s) specified in the path parameter.
This command only works with project methods. If you pass an invalid path, an error is generated.
In path, you can pass either a text containing a method path, or a text array containing an array of paths. You will need to pass the same kind of parameter (variable or array) in attributes in order to get the appropriate attributes.
In attributes, you pass an object or an array of objects, depending on the kind of parameter passed in path. All the attributes for the method(s) are returned as object properties, with "True"/"False" values for Boolean attributes, and additional values if necessary (for example, "scope":"table" for the 4D Mobile property).
If the command is executed from a component, by default it applies to the component methods. If you pass the * parameter, it accesses the methods of the host database.
Note: The existing METHOD Get attribute command is still supported but since it can only return Boolean values, it cannot be used for extended attributes such as 4D Mobile properties.
You want to get the attributes of the sendMail project method. You can write:
C_OBJECT($att)
METHOD GET ATTRIBUTES("sendMail";$att)
After execution, $att contains, for example:
{ "invisible":false, "publishedWeb":false, "publishedSoap":false, "publishedWsdl":false, "shared":false, "publishedSql":false, "executedOnServer":false, "published4DMobile":{ "scope":"table", "table":"Table_1" } }
Product: 4D
Theme: Language
4D v15 - Upgrade (standard edition) ( 4D v15)
Inherited from : METHOD GET ATTRIBUTES ( 4D v15)