Skip to main content
Version: Streamsheets 3.0

MONGO.COUNT

Counts the amount of elements in a Mongo database.

Syntax

=MONGO.COUNT(Connection, Collection, Query, Target, [Timeout])

Arguments

NameTypeDescription
ConnectionConnectionReference to connection used for counting. The database name is configured in the affiliated connection settings.
CollectionStringChoose an existing collection, where the item is stored.
QueryJSONDefine a query using a JSON cell range, which defines the object(s) to be counted.
TargetTargetINBOX(), 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.
Timeout (optional)NumberDefine Timeout in seconds.

Return

TypeDescription
Booelan or ErrorTRUE, if no error.

Examples

AB
1Collection:REP_SALES
2
3GenderM
4
5count
61
FormulaResultComment
=MONGO.COUNT(MongoConnection!,B1,JSON(A3:B3),A5:A6)
TRUECounts all males in a collection