dataobject Command

Dataobjects are a type of workspace object that provide a storage space for preference settings and other stored values for users.

For conceptual information on this command, see MQL Concepts: Dataobjects.

This page discusses:

User Level

Business Administrator

Syntax

The command uses this syntax.

[add|copy|modify|delete|list|print]dataobject NAME [CLAUSE];
  • NAME is the name of the dataobject you are defining. The dataobject name cannot include asterisks. When assigning a name to the dataobject, you cannot have the same name for two dataobjects. If you use the name again, an error message will result. However, several different users could use the same name for different dataobjects. (Dataobjects are local to the context of individual users.)
  • CLAUSEs provide additional information about the dataobject.

Add Dataobject

Dataobjects can be created in MQL only. To create a new dataobject, use the Add dataobject command.

Syntax

add dataobject NAME [user USER_NAME] [ADD_ITEM {ADD_ITEM}];
  • NAME is the name of the dataobject you are defining. The dataobject name cannot include asterisks. When assigning a name to the dataobject, you cannot have the same name for two dataobjects. If you use the name again, an error message will result. However, several different users could use the same name for different dataobjects. (Dataobjects are local to the context of individual users.)
  • USER_NAME can be included with the user keyword if you are a business administrator with person access defining a dataobject for another user. If not specified, the dataobject is part of the current user’s workspace.
  • ADD_ITEM further defines the dataobject.

The following are Add dataobject clauses:

description STRING_VALUE
type TYPE_STRING
value VALUE_STRING
[!|not] hidden
visible USER_NAME{,USER_NAME};
property NAME [to ADMIN] [value STRING] 

Type Clause

You can use this clause to classify various data objects. It does not refer to Types, but can be set to any string value up to 255 characters long.

type TYPE_STRING

Value Clause

This clause can be used to hold up to 2 gb of data.

value VALUE_STRING

This is where cached values and customized pages will be stored.

Copy Dataobject

After a dataobject is defined, you can clone the definition with the Copy dataobject command.

If you are a business administrator with person access, you can copy dataobjects to and from any person’s workspace (likewise for groups and roles). Other users can copy visible dataobjects to their own workspaces.

This command lets you duplicate dataobject definitions with the option to change the value of clause arguments:

copy dataobject SRC_NAME DST_NAME [COPY_ITEM {COPY_ITEM}] [MOD_ITEM {MOD_ITEM}];
  • SRC_NAME is the name of the dataobject definition (source) to be copied.
  • DST_NAME is the name of the new definition (destination).
  • COPY_ITEM can be:
    COPY_ITEMSpecifies
    fromuser USERNAMEUSERNAME is the name of a person, group, role or association.
    touser USERNAME
    overwriteReplaces any dataobject of the same name belonging to the user specified in the touser clause.

    The order of the Fromuser, Touser, and Overwrite clauses is irrelevant, but MOD_ITEMS, if included, must come last.

  • MOD_ITEM is modifications that you can make to the new definition. For more information, see Modify Dataobject.

Modify Dataobject

Use the Modify dataobject command to add or remove defining clauses and change the value of clause arguments.

modify dataobject NAME [user USER_NAME] [MOD_ITEM {MOD_ITEM}];
  • NAME is the name of the dataobject you want to modify. If you are a business administrator with person access, you can include the User clause to indicate another user’s workspace object.
  • MOD_ITEM is the type of modification you want to make. With the Modify dataobject command, you can use these modification clauses to change a dataobject:
    MOD_ITEM Specifies
    description STRING_VALUE The description is changed to the STRING_VALUE given.
    value VALUE_STRING The value is changed to the VALUE _STRING given.
    type TYPE The type value is changed to TYPE. This value is not a defined Type, but can be used as a way to classify dataobjects.
    hidden The hidden option is changed to specify that the object is hidden.
    nothidden The hidden option is changed to specify that the object is not hidden.
    visible USER_NAME{,USER_NAME}; The object is made visible to the other users listed.
    property NAME [to ADMINTYPE NAME] [value STRING] The named property is modified.
    add property NAME [to ADMINTYPE NAME] [value STRING] The named property is added.
    remove property NAME [to ADMINTYPE NAME] [value STRING] The named property is removed.

When making modifications, you simply substitute new values for the old. As you can see, each modification clause is related to the clauses and arguments that define the dataobject.

Although the modify dataobject command allows you to use any combination of criteria, no other modifications can be made except the ones listed. To change the dataobject name or remove it entirely, you must use the Delete dataobject command and/or create a new dataobject.

Delete Dataobject

If you do not need a dataobject, you can delete it using the Delete dataobject command.

delete dataobject NAME [user USER_NAME];
  • NAME is the name of the dataobject to be deleted. If you are a business administrator with person access, you can include the User clause to indicate another user’s workspace object.

Searches the local list of existing dataobjects. If the name is found, that dataobject is deleted. If the name is not found, an error message results.