Using the following command in the Mongo shell updates the records field of all documents to the number of elements in history field array of that document:
db.auditlogInvoice.updateMany({},[{$set: {records: { $size: "$history" }}}])
However via a workflow step in retool:
It instead creates an object:
"records": {
"$size": "$history"
}
So it is taking the literal string rather than the $size command.
Any ideas why if it's my end please? M0 Atlas Cloud cluster, Retool Cloud hosted version 3.89.0