4D v14.3

METHOD SET ATTRIBUTE

Home

 
4D v14.3
METHOD SET ATTRIBUTE

METHOD SET ATTRIBUTE 


 

METHOD SET ATTRIBUTE ( path ; attribType ; attribValue {; attribType2 ; attribValue2 ; ... ; attribTypeN ; attribValueN}{; *} ) 
Parameter Type   Description
path  Text in Path of project method
attribType  Longint in Type of attribute
attribValue  Boolean, Text in True = select attribute, False = deselect attribute
or Folder name
Operator in If passed = command applies to host database when executed from a component (parameter ignored outside of this context)

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:

Constant Type Value Comment
Attribute executed on server Longint 8 Corresponds to the "Execute on server" option
Attribute folder name Longint 1024 Name 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 invisible Longint 1 Corresponds to the "Invisible" option
Attribute published SOAP Longint 3 Corresponds to the "Offered as a Web Service" option
Attribute published SQL Longint 7 Corresponds to the "Available through SQL" option
Attribute published Web Longint 2 Corresponds to the "Available through 4D HTML tags and URLs (4DACTION...)" option
Attribute published WSDL Longint 4 Corresponds to the "Published in WSDL" option
Attribute shared Longint 5 Corresponds 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.

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

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

Setting several attribute/value pairs:

 
PROPERTIES 

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

 
HISTORY 

New
Created: 4D v13
Modified: 4D v14

 
SEE ALSO 

Design Object Access
METHOD Get attribute

 
ARTICLE USAGE

4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : METHOD SET ATTRIBUTE ( 4D v13.5)