Back

[SOLVED] Trigger function by specific update to an attribute of a document

  • 0
  • Functions
  • Web
Said H
21 Jun, 2023, 21:22

Hello, i was reading the documentation but can't find this. I just want to check whether it is possible to set up a function event to be triggered when there is an update to a specific document's attribute.

For example, an attribute named "status" gets updated from true to false.

TL;DR
User is asking if it's possible to trigger a function event when there is an update to a specific attribute of a document. A workaround suggested is to create a second collection with only the specific attribute and listen to events for that collection. However, it is clarified that events are document based only.
Binyamin
21 Jun, 2023, 21:37

Nope, Events are document based only.

Binyamin
21 Jun, 2023, 21:49

A quick workaround would be to create a second flags collection that will have only, for example:

  • option id
  • status

And listen to events for that small collection.

Said H
22 Jun, 2023, 05:15

thanks @Binyamin for the workaround 🙂

Said H
22 Jun, 2023, 05:15

[SOLVED] Trigger function by specific update to an attribute of a document

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more