insertRandom Transaction Format

About insertRandom Transaction Format

insertrandom transaction format inserts an object into the specified class including all pointer, note, and permission information for that object.

Syntax

insertRandom class-name {
[permGrantGroups {
(add | remove) = "Group Name" fd
}]
[permGrantUsers {
(add | remove) = "User Name" fd
}]
[objectPtr pointer-name {

class = class-name fd
(field1) = "str1" fd
(field2) = "str2" fd
..
.
(fieldN) = "strN" fd
} ]
[(field1) = "str1" fd
(field2) = "str2" fd
..
.
(fieldN) = "strN" fd]
[objectPtr pointer-name
{
class = class-name fd
(field1) = "str1" fd
(field2) = "str2" fd
..
.
(fieldN) = "strN" fd
} ]
..
.
} ]
}

Explanation

You can use one or more objectPtr statements to specify values for any pointers that are available for the specified class. Use these pointers to supply values for primary keys that are also pointers, as well as to provide values for non-primary key pointers.The class name points to the class of the object. The fields that follow the objectPtr keyword indicate the primary keys for the object being pointed.

[objectPtr pointer-name {
class = class-name fd
(field1) = "str1" fd
(field2) = "str2" fd
...
(fieldN) = "strN" fd
}]
[permGrantGroups {
(add | remove) = "group-name" | all fd
...
}]
...

Use the permGrantGroups statement to grant or revoke write permission to or from, one or more user groups. To grant to or revoke from all groups, set the add or remove statement to all.

[permGrantUsers {
(add | remove) = "user-name") fd
...
}]

Use the remaining fields to specify values for additional class properties of the class in which you are inserting the new object.

[(field1) = "str1" fd
(field2) = "str2" fd
...
(fieldN) = "strN" fd]

 

Example

This example adds a new user called John, assigns the user a locale ID, and adds the user to the cisquery permissions group.

InsertRandom s_usr_class {
s_usr_name = "John";
s_usr_passwd = "John";
objectptr s_usr_loc_id {
class = s_loc_class;
s_loc_id = "1001";
}
permGrantGroups {
add = "cisquery";
}
}