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

35 messages · Page 1 of 1 (latest)

noble rampart
#

how can i use something like this?

  Future result = database.getDocument(
    databaseId: '[DATABASE_ID]',
    collectionId: '[COLLECTION_ID]',
    documentId: '[DOCUMENT_ID]',
  );
lethal lintel
#

Check for APPWRITE_FUNCTION_EVENT_DATA

noble rampart
#

Do you know any examples of using functions with databases?

lethal lintel
noble rampart
#

what bout using CRON in functions?

lofty steeple
noble rampart
#

I tried functions in settings

#

but it shows this!

lofty steeple
#

Make sure there is no extra spaces

noble rampart
#

I did but it shows the same warning everytime..

lofty steeple
#

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

vernal viper
vernal viper
lofty steeple
#

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

noble rampart
#

I'm using cloud version 1.1.2

#

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

crystal arrow
#

Please don't tag the core team.

#

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

#

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

#

Try the basic things like refreshing your page, etc.

noble rampart
noble rampart
crystal arrow
crystal arrow
noble rampart
noble rampart
#

was cli developed after version 1.1.2 ?

crystal arrow
# noble rampart yes i did it through cli

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

#

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

noble rampart
#

Ohh okay will try that!

crystal arrow
noble rampart
#

sure will let you know! Thanks alot