Query the doc before update

I want to get a doc before update, follow the example.

1º Event
{"date_sent":"2018-04-18T13:57:42.005","token":"1"}]

2º Event
{"date_open":"2018-04-18T14:57:42.005","token":"1"}]

3º Event
{"date_open":"2018-04-18T15:57:42.005","token":"1"}]

I don't want update date_open from third time, so whenever the end user opens an e-mail, i will write just the first date_open.

Data on 1º Event

"date_sent":"2018-04-18T13:57:42.005"
"token":"1"
"type":"e-mail"

Data on 2º Event

"date_sent":"2018-04-18T13:57:42.005"
"date_open":"2018-04-18T14:57:42.005"
"token":"1"
"type":"e-mail"

Data on 3º Event

"date_sent":"2018-04-18T13:57:42.005"
"date_open":"2018-04-18T14:57:42.005"
"token":"1"
"type":"e-mail"

Date_open must be writen at the first time but never updated !

You should be able to do that with Scripted Update

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.