Back

[SOLVED] Unable to add document to collection

  • 0
  • Databases
  • Web
KehindeJ
10 Jun, 2023, 12:29

I've been getting an error:
Invalid document structure: Missing required attribute "board_id" when trying to add a document to a collection even though I added this. Here's how the Javascript function looks like: api.createColumn({ title: columnName, board_id: bId }); and in the column collection, I defined the title and board attributes. What's wrong?.

P. S. The bId represents the id of the board that the column belongs to.

TL;DR
The user was unable to add a document to a collection and posted their issue on the support channel. They later realized that they had not passed a parameter to the function causing the problem. They apologized and asked for the code for the createColumn function. The error they encountered was "Invalid document structure: Missing required attribute 'board_id'" despite adding it. They provided the function code as an example. There was no solution provided in the thread.
Drake
10 Jun, 2023, 21:53

Can you please share the code for the createColumn function?

KehindeJ
11 Jun, 2023, 08:05

Oh, so sorry Steve, I realised I had not passed a parameter to the function. So sorry. I'll make sure to review my code for mistakes before making a post in the support channel. So sorry again.

Drake
11 Jun, 2023, 14:05

[SOLVED] Unable to add document to collection

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