CMISSetDocUploadProperty
Sets the value of a property that belongs to the file that is uploaded.
Member of namespace
CMISClientSyntax
bool CMISSetDocUploadProperty(string cmisDocProperyName, string cmisDocProperyValue,
string valueType, bool isMulti)
Parameters
- cmisDocProperyName
- Type: string
- cmisDocProperyValue
- Type: string
- valueType
- Type: string
- isMulti
- Type: bool
Parameters
- cmisDocProperyName : The name of the CMIS property to set.
- cmisDocProperyValue : The value of the specified property.
- valueType : The CMIS type of the value. Must be string, integer, datetime, or boolean.
- isMulti : True, if the CMIS type is a multi-value type. False, if the CMIS type is single.
Smart parameters are supported for cmisDocProperyName, cmisDocProperyValue and valueType.
Returns
False, if the property cannot be set or the datetime parameter cannot not be processed. Otherwise, True.Level
All levels.Details
This action sets a value to the specified property for files or pages that are uploaded to the CMIS repository. Use of this action is optional. Standard CMIS properties are of the form CMIS:xxx. By convention, custom CMIS properties do not use the CMIS: prefix.This action must be called before CMISUploadFile or CMISUploadPage. If multiple properties need to be set for a document upload, call this action multiple times to set multiple properties. The property must be defined for the document type within the CMIS repository. If the property or value is not valid for the document type, the error is not reported until the upload action is called. When the upload is complete, the property settings set with this action are discarded and this action needs to be called again to set any custom properties for another upload.
For a Boolean property type, the value must be either True or False.
The datetime type accepts an input string that specifies just the date or the date and time. The application attempts to parse the input date format based on the current locale. The action uses the locale set in the Application Service / hr_locale variable. If that is not set, the current OS locale is used to interpret the date/time. The action attempts to ignore unrecognized data, if possible. If the month, day, or year is missing, it attempts to use the values from the current date. If a time is not specified, then the time is set to 12:00 midnight. It is recommended to provide the full short date in the correct format for the current locale, and a full 4-digit year, to reduce the chance of the action guessing values incorrectly. Only Gregorian short date formats are supported.
- 05/01/2009 14:57:32.8 becomes 5/1/2009 2:57:32 PM
- 2009-05-01 14:57:32.8 becomes 5/1/2009 2:57:32 PM
- 2009-05-01T14:57:32.8375298-04:00 becomes 5/1/2009 11:57:32 AM
- 5/01/2008 14:57:32.80 -07:00 becomes 5/1/2008 2:57:32 PM.
- Example:
SetCMISDocUploadType("cmisbook:poem") SetCMISDocUploadProperty("cmisbook:author", "Edgar Allan Poe", "string", False) SetCMISDocUploadProperty("cmisbook:Title", "The Raven", "string", False) CMISUploadPage("MyFile.txt", "/MyCMISDir", "text/plain")This example uses a predefine custom document type and then sets the author and title properties of the uploaded file.