Skip to main content
Version: Streamsheets 2.5

MONGO.QUERY

Gets data from your Mongo database. You can use the Function Wizard for this function.

Syntax

=MONGO.QUERY(Producer, Collection, QueryJSON, Target, [ResultKeys], [PageSize], [Page], [Sort], [Timeout])

Arguments

NameDescription
ProducerProducer to use for deleting. The database name is configured in the affiliated Connector.
CollectionChoose an existing collection, where the item is stored.
QueryJSONDefine a query using a JSON cell range, which defines the object(s) to searched for.
TargetINBOX(), OUTBOX("MsgID") or a cell range where the result will be placed. Make sure the cell range is big enough or not everything is displayed.
ResultKeys (optional)Filter the query result.
PageSize (optional)Number of Documents to return per page.
Page (optional)Index of page to return.
Sort (optional)Sort query result ascending or descending. Use 1 and -1 to sort by creation time, or use a JSON cell range.
Timeout (optional)Define Timeout.

Return

TRUE, if no error.

Examples

FormulaResultComment
=MONGO.QUERY(|MongoProd, H13,JSON(F16:G16),F18:N21)
TRUEAll documents in the database with the "Gender" male in the collection "TestCollection" will be shown in the range F18:N21 of the current Streamsheet. Use INBOX() as a "Target" to prevent space issues.