Element Details: Procedure.Mongo+Update
 Back


Available in: Logi Info Source code name: Procedure.MongoUpdate

Procedure.Mongo Update updates documents in a Mongo collection.

Use the Mongo Query Document attribute to identify the document(s) to be updated. Use the Mongo Update Document attribute to specify the updated document or values.

Mongo Update can perform "upserts", which either update an existing document or insert a new document.

Use "@Procedure.myProcedureID.DocumentsAffected~" to determine the number of documents actually updated or inserted.

Element Group:MongoDB



ATTRIBUTES

Click attribute Name to drill down for more information.

NamePossible ValuesDescription
ConnectionID
UserDefined
(Required) Specifies a connection to a data source that is defined in the Settings. For elements connecting to relational databases, default is the first Connection element in _settings.lgx.
ID
UserDefined
(Required) The ID attribute is a pervasive attribute that uniquely identifies an element within a definition file. The ID needs to be a unique value within the definition.
MongoCollection
UserDefined
(Required) Name of the Mongo collection.
MongoQueryDocument
UserDefined
(Required) MongoQueryDocument specifies a Mongo "find" document to identify one or more documents. To vary the document content based on user or other input, use tokens inside the document, such as @Request tokens. Examples: Find all documents with "type" equal to "snacks". { type: "snacks" } Find all documents with "type" equal to "food" or "snacks" { type: { $in: [ "food", "snacks" ] } }
MongoUpdateDocument
UserDefined
(Required) MongoUpdateDocument specifies a document to be updated or possibly inserted. To update just some attributes, instead of replacing the entire document, use the Mongo $set operator. To vary the document content based on user or other input, use tokens inside the document, such as @Request tokens.
MongoWriteConcern
Unacknowledged
Acknowledged
This specifies whether the command should wait for acknowledgement of the write. The default is "Acknowledged", to wait for acknowledgement.
MultipleDocuments
True
False
Specifies whether this command should affect multiple documents. Default value is False.
Upsert
True
False
Specifies whether this update command should be performed as an upsert. That is, when the key already exists, that item is updated, otherwise a new item is inserted Default value is False.



PARENT ELEMENTS

Click element to drill down for more information.

If Error
Procedure.Else
Procedure.File Exists
Procedure.Folder Exists
Procedure.If
Procedure.Run Datalayer Rows
Procedure.Run DataTable Rows
Procedure.Switch Case
Procedure.Switch Else
Task


CHILD ELEMENTS

Click element to drill down for more information.

If Error


 Back to top


 Chart Debug