I have a user case where I need to create a new collection for every businesses that register with my app, is there any way that I can do that programatically without having to copy paste collection id ?
Sure! Using a server side sdk, you have the ability to create databases, collections, attributes, etc.
https://appwrite.io/docs/references/cloud/server-nodejs/databases#createCollection
You could do something like creating a function that is triggered off the event of a new business document being added into your main business collection.
In this function you would create the new collection for that business and add the initial set of attributes that you want.
You can then have a collection that shows when it's ready so the customer can start operation. And in your UI you have some sort of "Standby, were getting everything ready for you" page.
I am using flutter, is there server side package for flutter?
I saw you were using flutter, that's why I mentioned creating a background function that does this.
There is a server side package for dart, but I don't know how much help that would be.
sure, brain is being foggy, sorry about that.
No biggie :) For these types of operations you wouldn't want to expose it to the client
I got the idea now, thanks:appwriteheart:
Recommended threads
- Hi Appwrite Support Team,My project has ...
Details: Project ID: 69a69f6f00113ed0e8e4 Region: SFO (sfo.cloud.appwrite.io) Error Response: Affected: ALL endpoints — Functions, Databases, Storage, Health, ...
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...