#increment/ decrement stock or inventory
7 messages · Page 1 of 1 (latest)
No, there’s currently no way to increment or decrement an Attribute in a Document. Discussions about how are ongoing
ok i'll be waiting for this, thank you
You can update by using appwrite functions
can you show a simple example of how can i do so; or is their any links i can refer to ?
I don't think there are any direct examples of doing this but it shouldn't be hard.
Create a function (you can have this trigger on when a new order is put/deleted in the database)
Pull the current stock count
Increment it by one
save the new stock count
There’s not really any way to do it - without having to work around race conditions