My function is executed after the document update , how i can get the oldValue and Current Document in the cloud function ?
For now you'll get only the current-updated values of the document.
This is a requested feature, you can check about it here (and upvote): https://github.com/appwrite/appwrite/issues/3294
The quick workaround would be what Steven's suggesting here https://github.com/appwrite/appwrite/discussions/5615#discussioncomment-6071506
and that value is in the req.variables.APPWRITE_FUNCTION_EVENT_DATA ?
as a whole document ?
I have to do some extra work for this to work . Okay thanks
Yes.
Recommended threads
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I can’t fin...
- Triggers and call function in function p...
Hello, Today we are experiencing several issues with Appwrite Cloud. Functions triggered by events, or functions called from another function, are taking an e...
- Functions executed by events does not ap...
Hello, Running self-hosted Appwrite version 1.9.0 (with console 7.8.26). When functions are triggered by an event (eg. databases.\*tables.\*.rows.\*.create) doe...