Mongo DB Update One is not working

Hi,

I am trying to update a record in MongoDB with data, though it does not fail, it shows the "modifiedCount: 0". This query is working fine on Mongo Shell and updates are happening, but not on Retool. Can you pls help?

Hi @vamz_amz, Can you try removing all of the quotes around the values that are wrapped in double curlies?

For example, "{{table2.selectedRow.orderdate}}" should be {{table2.selectedRow.orderdate}}. If it doesn't already evaluate to a string, you could do {{JSON.stringify(table2.selectedRow.orderdate)}}

You'll also want to make sure any closing } have space between any double curly dynamic values. In this case, you'll need a space between .orderdate)}} and the closing }}}:

{orders: {$elemMatch: {orderdate: {{table2.selectedRow.orderdate}} }}}