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
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...