Back

Create cloud function

  • 0
  • Self Hosted
  • Functions
LDs_Group
24 May, 2023, 20:41

collections

TypeScript
- contacts:
    - name
    - total_amount
- transactions:
    - contact_id
    - transaction_type
    - date
    - amount

Q: When I create new transaction, I need to update total_amount in contact collection with logic depend on transaction_type. Manually, I work ๐Ÿ‘ but I know that cloud function can make it easy and powerful๐Ÿ’ช. Problem, I'm zero acknowledge in functions implementation ๐Ÿ˜ช and he doesn't have serious video on YouTube about that ...

TL;DR
Title: Need help with cloud function implementation - User is looking for an example and guidance on how to use cloud functions in Appwrite - Other users are also seeking help on the same topic - Suggestion to read through the function documentation and watch a video tutorial - User shares their specific use case, wanting to update a field in a collection based on transaction type - User admits lack of knowledge in functions implementation - No solution provided in the thread
Drake
24 May, 2023, 21:42

A video? There's this: https://youtu.be/p0Hw50QfDNk

Drake
24 May, 2023, 21:42

Have you read through the function docs? https://appwrite.io/docs/functions

LDs_Group
24 May, 2023, 22:01

I'm watching

LDs_Group
28 May, 2023, 10:42

Hi, after watching I'm already 0.

LDs_Group
28 May, 2023, 10:43

I want solve problem posted below and soon implement payment system

bharath
28 May, 2023, 11:18

Yes same issue here ...

Drake
28 May, 2023, 15:12

What?

LDs_Group
28 May, 2023, 15:31

I need an example of how to use function

LDs_Group
28 May, 2023, 15:34

Like solution for this. After that, I'll be able to understand function implementation

Drake
28 May, 2023, 16:53

In your case you might want to trigger an execution via event. The data that triggered the event would be in the event data variable.

Where else are you stuck?

LDs_Group
28 May, 2023, 16:58

I will create an exemple and share it here to analyze

Drake
28 May, 2023, 17:00

I highly recommend starting your Appwrite function and playing around with it to really learn how it works

LDs_Group
28 May, 2023, 17:01
LDs_Group
28 May, 2023, 19:50

Red comments, how to solve

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