MongoDB.NewCursorFromCommandReply
---------------------------------

Creates a cursor object from the reply of a command.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MongoDB](component_MongoDB.md) | [12.4](newinversion124.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "MongoDB.NewCursorFromCommandReply"; MongoDBRef; commandReplyJSON { ; OptionsJSON } ) 

**MBS**( **"MongoDB.NewCursorFromCommandReply";** /\* Creates a cursor object from the reply of a command. \*/  
**$MongoDBRef**; /\* The reference number for the mongo connection.e.g. $MongoDB \*/   
**$commandReplyJSON**; /\* The reply to a command, such as “aggregate”, “find”, or “listCollections”, that returns a cursor document. \*/   
**$OptionsJSON**) /\* Optional; Additioanl options.  
See MongoDB documentation. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| MongoDBRef | The reference number for the mongo connection. | $MongoDB |  |
| commandReplyJSON | The reply to a command, such as “aggregate”, “find”, or “listCollections”, that returns a cursor document. |  |  |
| OptionsJSON | Additioanl options.   See MongoDB documentation. |  | Optional |

### Result

Returns OK or error.

### Description

Creates a cursor object from the reply of a command.  
Some MongoDB commands return a "cursor" document.  
### Release notes

- **Version 12.4**
    - Added [MongoDB.CursorErrorDocument](https://www.mbsplugins.eu/MongoDBCursorErrorDocument.shtml) and [MongoDB.NewCursorFromCommandReply](https://www.mbsplugins.eu/MongoDBNewCursorFromCommandReply.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin 12.4](https://www.mbsplugins.de/archive/2022-09-27/MBS_FileMaker_Plugin_124/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.4pr1](https://www.mbsplugins.de/archive/2022-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 17th July 2022 , last changed 17th July 2022

  
[MongoDB.New](MongoDBNew.md) - [MongoDB.NextChange](MongoDBNextChange.md)

[HTML Version](MongoDBNewCursorFromCommandReply.shtml)