MongoDb connected system is throwing exception error for "Update One in Collection Operation" in integration

Certified Associate Developer

We are using Appian's MongoDB connected system. In our integration object we are using "Update One in Collection" operation to update a specific element of an Array of Documents.

Below are the Filter JSON, Update Instructions JSON and Error Message

--- Filter JSON ---

a!toJson( { '$and': { { { "_id": { '$oid': "6407f59c20f85f4027c3655b" } } } } } )

--- Update Instructions JSON ---

a!toJson( { '$set': { "form_schedule.$[elem].formName.oldValue": "forms old value 1" }, '$arrayFilters':{ m_field( "elem.amendmentComments", m_eq( "Rk Form Number" ) ) } } )

--- ERROR MESSAGE --

Mongo Write Exception error-result-guidance Write operation error on server serff-develop-shard-00-02.ylpdg.mongodb.net:27017. Write error: WriteError{code=2, message='No array filter found for identifier 'elem' in path 'form_schedule.$[elem].formName.oldValue'', details={}}.

  Discussion posts and replies are publicly visible

Parents Reply Children