In this Content Extended Operations example, the procedure
steps through creating a document that is complete with content and
properties.
The content must be specified as a string. Almost any
data with a text/* MIME type is possible: for example, text/plain,
text/html, text/xml. The object is filed into the specified folder.
Content Extended Operations are available for the Component step only.
- Select the Component step to open the Properties pane.
- On the Properties pane, click Add in
the Operations section.
- Click createDocument to create a
new document.
- Specify the following expression values in the Operation
Parameters section:
- destFolder: A folder in which to create the new document.
- className: A string containing the class name to use for the new
document.
Note: When using Content Extended Operations,
the create operations will fail if the Document class Display name
contains spaces.
- propArray: Properties for the new custom object. For the specified
document property, you must create three elements within the array:
the document's symbolic name, data type and value. An example:
{"DocumentTitle", "STRING", "New Expense Report",
"FirstName", "STRING", fName,
"LastName", "STRING", IName}
When specifying a value
for a non-string property, you must convert the value to a string
in order to place it within the array. For example:
{"DocumentTitle", "STRING", "New Loan Application",
"LoanAmount", "DOUBLE", numbertostring(loanAmt),
"AppDate", "DATETIME", timetostring(appDate)
"SpecialLoan", "BOOLEAN", convert(spclLoan, string)}
You
cannot modify multivalue properties using a properties array. To modify
multivalue properties, you must use the setMulti<type>Property
operations.
The following table describes the possible data
types, as well as which function you should use for converting each
type to a string.
Data Type |
Conversion function |
BOOLEAN |
convert(bool_value, string) |
DATETIME |
timetostring(time_value) |
DOUBLE |
numbertostring(float_value) |
INTEGER |
numbertostring(int_value) |
OBJECT |
convert(attachment, string) |
- fileName: A string containing the file name of the new document.
- mimeType: A string containing the MIME type for any new content.
- content: A string containing the content of the new version. For
new lines, use "\n".
- return_value: The new document.

- After specifying the parameters, click OK.