Admin
👀
Votes
0
Replies
24
Participants
Unknown
Messages
25
Admin
👀
Admin
Do you know what this does?
databases.createDocument('64502243369b884d71f8', '6450225bbca140600f16', ID.unique(), {name}, {DOB}, {feet}, {inch}, {weight}, {school}, {sport}, {position}, {age}, {better})Admin
e.g. what this is? {name}
Rank 3: Container
yes I do
Rank 3: Container
They are all form inputs
Rank 3: Container
I have also tried without the brackets and samething
Admin
you know that {name} is the same as {name: name}?
Rank 3: Container
What do you mean Im confused
Admin
{name} is syntactic sugar for {name: name}
Rank 3: Container
This is the output I get when I do no brackets AppwriteException [Error]: Invalid data: Value must be a valid JSON string at Client.call (C:\Users\canno\Desktop\Work\Clients\Phelps-Fitness\phelps-fit-2\node_modules\node-appwrite\lib\client.js:172:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Databases.createDocument (C:\Users\canno\Desktop\Work\Clients\Phelps-Fitness\phelps-fit-2\node_modules\node-appwrite\lib\services\databases.js:1666:16) { code: 400, type: 'general_argument_invalid', response: { message: 'Invalid data: Value must be a valid JSON string', code: 400, type: 'general_argument_invalid', version: '1.2.0' } }
Admin
Admin
how many arguments does createDocument() expect?
Rank 3: Container
10
Admin
no
Rank 3: Container
Oh your asking for appwrite
Rank 3: Container
Well I am guessing only 1 by how this is working out for me
Admin
no
Rank 3: Container
Ok I am understanding now I think. I just figured out how to do what you just did. so 5 arguments
Rank 3: Container
So I need to put it into an array then use it?
Admin
no
Admin
Rank 3: Container
Got it!!!
Rank 3: Container
Name: name, DOB: DOB, Feet: feet, Inch: inch, Weight: weight, School: school, Sport: sport, Position: position, Age: age, Better: better };```Rank 3: Container
Thank you!!
Admin
[SOLVED] Document Creation