#EDIT
Syntax
Parameters
- Content Type - Which Content Type to add information to.
- Unique Value - A value to uniquely identify the content record to be updated. It can be the value of the first content type field marked as a Unique/Key, or a field=value pair (ie. OID=10).
- User - Which webCOMAND user account will be credited for adding the new content.
- Comment - Comment about this update that does not effect the content object, but will appear in the version notes for this edit.
Description
The #EDIT Script Statement allows for the modification of existing Content Records. If a Content Type contains more than one record with the unique value used to reference it, #EDIT will choose the content record closest to the Publication Destination Content Folder with that field value.
The value for each field in the content record is set using the #ASSIGN, #NEW or #APPEND statements inside the #EDIT block. A content record field is set by assigning a value to a variable with a name that corresponds to the field identifier.
Fields that contain a single reference to another content record may also be set with #ASSIGN, #NEW or #APPEND statements inside the #EDIT block. Those fields are also set with the variable name that corresponds to the field identifier. The value should be the ID number that corresponds to the content record to be referenced.
Fields that contain multiple references or embedded content records must be set with #SQL statements and is only recommended for advanced database developers.
It is possible to edit content locked/opened by a user, if that same user is the one publishing/processing the script used to edit the content.
See also #ADD.
This statement does not produce output.
Example 1
#EDIT(ContactInfo,OID=2,'webcomand','Web Site Form')
#ASSIGN($FirstName,$GetFirstName)
#ASSIGN($LastName,$GetLastName)
#ENDEDIT