Back

How to get the database id, collections id and document id in appwrite functions?

  • 0
  • Functions
  • Cloud
Binyamin
2 Jun, 2023, 16:22

Make sure there is no extra spaces

TL;DR
User is seeking assistance on how to obtain the database id, collection id, and document id in Appwrite functions. There is no solution provided in the thread.
Dipen
2 Jun, 2023, 16:24

I did but it shows the same warning everytime..

Binyamin
2 Jun, 2023, 16:26

What version of Appwrite it is? Just ran it in the cloud and seems to work

Drake
2 Jun, 2023, 17:23

careful about using this repo because it's old and archived

Drake
2 Jun, 2023, 17:24

i know this was raised and a fix was added so maybe this is only on cloud.

Binyamin
2 Jun, 2023, 17:25

I've tested on the cloud and self hosted. Both worked

Dipen
4 Jun, 2023, 06:20

I'm using cloud version 1.1.2

Dipen
4 Jun, 2023, 06:20

but i'm still getting this. I couldn't solve it!

Dipen
4 Jun, 2023, 06:20
safwan
4 Jun, 2023, 12:43

Please don't tag the core team.

safwan
4 Jun, 2023, 12:44

Something to note is that your exact cron expressions work on my end on cloud and self-hosted. It even works on @Binyamin's end.

safwan
4 Jun, 2023, 12:44

Might sound dumb, but have you tried logging out and back in?

safwan
4 Jun, 2023, 12:45

Try the basic things like refreshing your page, etc.

Dipen
4 Jun, 2023, 12:54

Sorry but I had to solve this in order to run my app and i was hoping to get the answer

Dipen
4 Jun, 2023, 12:55

yes tried

safwan
4 Jun, 2023, 12:55

Not an issue, please dont do it again though 😄

safwan
4 Jun, 2023, 12:55

Weird. Did you deploy your function with the appwrite cli?

Dipen
4 Jun, 2023, 12:55

this also i tried.. but didn't work

Dipen
4 Jun, 2023, 12:56

yes i did it through cli

Dipen
4 Jun, 2023, 12:56

was cli developed after version 1.1.2 ?

safwan
4 Jun, 2023, 12:57

Okay in that case, you should have a file called appwrite.json. Try setting the cron expression for your function in the appwrite.json file, and redeploy from the cli

safwan
4 Jun, 2023, 12:58

Cuz the issue you're getting seems like a frontend validation issue. Doing it through the CLI should fix it

Dipen
4 Jun, 2023, 13:00

Ohh okay will try that!

safwan
4 Jun, 2023, 13:02

Let me know how it goes

Dipen
4 Jun, 2023, 13:07

sure will let you know! Thanks alot

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