Update Custom Object Record
With this node you can update a record in a custom objects collection.
It has the following configuration options:
- Record Data Type: here you can specify how the contents
of the JSON Data parameter should be interpreted. Options:
- Auto detect: if you select this option, the code will examine the content of the provided data, and then use it either as JSON Data or as a URL.
- JSON in a container (output from another node): if you select this option, the content will be interpreted as content in a container, coming from another node.
- JSON Data (e.g. from a variable): if you select this option, the content of the data will be interpreted as JSON Data.
- URL Reference: if you select this option, the content of the data will be interpreted as a URL.
- Mode: here you can decide if a record should be updated
and/or created. Options:
- Update: if you select this option, the specified data should update an existing record. This means that the data must contain a valid _id field.
- Create: if you select this option, the specified data should create a new record . This means that the data should not contain a valid _id field.
- Create or update: if you select this option, the specified data can create a new record or update an existing record. This depends on whether a valid _id field is present or not.
- Record Data: here you can specify the data you want to
save in the collection. Depending on the value of the
Mode parameter, a valid _id should or should
not be present. The complete content of an existing record will be replaced by
the specified data. Depending on the value of the Record Data
Type parameter, the JSON can be:
- A JSON data generated by a previous node.
- A URL reference to a JSON file.
- Collection: here you can specify the name of collection you want to use. Make sure the name includes the database name (for example nucleus.files).
- JSON Output: here you can specify where to save the JSON
data.
- If you leave this field blank, the data will be sent to a container in the database and no physical file will be created.
- If you define an absolute CLOUDFLOW URL (
cloudflow://...
, see Server URL for more information), containing a file name and an extension, a physical output file with the specified file name will be created.
- Overwrite existing file: if you select this checkbox, files that already exist will be overwritten. If you leave this checkbox unselected, existing files will not be overwritten and an error is displayed.