Skip to main content
Version: 20 R7 BETA

METHOD SET ATTRIBUTE

METHOD SET ATTRIBUTE ( path ; attribType ; attribValue {; attribType2 ; attribValue2 ; ... ; attribTypeN ; attribValueN}{; *} )

ParameterTypeDescription
pathTextPath of project method
attribTypeIntegerType of attribute
attribValueBoolean, TextTrue = select attribute, False = deselect attributeor Folder name
*OperatorIf passed = command applies to host database when executed from a component (parameter ignored outside of this context)

Description

The METHOD SET ATTRIBUTE command sets the value(s) of the attribType attribute(s) for the project method designated by the path parameter. This command only works with project methods. If you pass an invalid path, an error is generated.

In the attribType parameter, pass a value indicating the type of attribute to set. You can use the following constants, found in the Design Object Access theme:

ConstantTypeValueComment
Attribute executed on serverInteger8Corresponds to the "Execute on server" option
Attribute folder nameInteger1024Name of folder for the method ("folder" attribute). When you pass this constant, you must pass a folder name in attribValue:
if this name corresponds to a valid folder, the method is placed in this parent folder,if the folder does not exist, the command does not change anything at the parent folder level,if you pass an empty string, the method is placed at the root level.
Attribute invisibleInteger1Corresponds to the "Invisible" option
Attribute published SOAPInteger3Corresponds to the "Offered as a Web Service" option
Attribute published SQLInteger7Corresponds to the "Available through SQL" option
Attribute published WebInteger2Corresponds to the "Available through 4D HTML tags and URLs (4DACTION...)" option
Attribute published WSDLInteger4Corresponds to the "Published in WSDL" option
Attribute sharedInteger5Corresponds to the "Shared by components and host database" option

In the attribValue parameter, you can pass either:

  • True to select the corresponding option or False to deselect it, or
  • a string (folder name) if you used the Attribute folder name constant in attribType.

You can pass multiple attribType;attribValue pairs in a single call.

You can execute this command from a component, but in this case, you must pass the * parameter because access to the component code is read-only. If you omit the * parameter in this context, the error -9763 is generated.

This command cannot be executed in compiled mode. When it is called in this mode, it will generate the error -9762.

Example 1

Selection of the "Shared by components and host database" property for the "Choose dialog" project method:

 METHOD SET ATTRIBUTE("Choose dialog";Attribute shared;True)

Example 2

Setting several attribute/value pairs:

 METHOD SET ATTRIBUTE(vPath;Attribute invisible;vInvisible;Attribute published Web;v4DAction;Attribute published SOAP;vSoap;Attribute published WSDL;vWSDL;Attribute shared;vExported;Attribute published SQL;vSQL;Attribute executed on server;vRemote;Attribute folder name;vFolder;*)

See also

Design Object Access
METHOD Get attribute
METHOD SET ATTRIBUTES

Properties

Command number1192
Thread safe