Back

[Solved] Cant set to null a datetime after adding a value

  • 0
  • Databases
Isai
16 Feb, 2023, 17:58

Problem: I have an attribute of type Datetime, is not required, once I set that attribute value, Im not able to set it back to null if I need it . Is there a way to allow it to go back to null?

TL;DR
The user is having trouble setting a datetime attribute to null after adding a value. One solution mentioned is sending the null value through the SDK, which should be accepted by the system. Additional testing is mentioned to be done to confirm if setting it as null works from the flutter app. It is also clarified that setting it to null via console or API/SDK doesn't work. There is a question if this issue applies to all attributes, like integers and strings. No direct solution is mentioned in the thread.
Drake
16 Feb, 2023, 20:49

Does this apply to all attributes? Like integer, strings, etc?

Isai
16 Feb, 2023, 23:24

it doessnt seem like it, but I havent done a big test

Isai
16 Feb, 2023, 23:24

error will happen also on console

Isai
16 Feb, 2023, 23:24

you cant set it to null even in the console I mean

Drake
16 Feb, 2023, 23:28

console will definitely not work. How about via API/SDK?

Isai
16 Feb, 2023, 23:31

I'll do some testing tomorrow morning and keep you posted, but I think it doesnt changes when I do it from my flutter app, but I need to review the code to make sure Im trying to set it as null

Drake
17 Feb, 2023, 00:02

It would be helpful for us to know if it's included in the network request as null but it doesn't actually set the attribute to null

Isai
22 Feb, 2023, 18:25

Hey! I was just able to test it, we can send it from the SDK with a null and the system will accepted, I'll set this as solved

Isai
22 Feb, 2023, 18:42

[Solved] Cant set to null a datetime after adding a value

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